{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "u9QoZqAOAk9d"
      },
      "source": [
        "To generate text2cypher dataset based on your own data, you could refer to: https://github.com/tomasonjo/text2cypher"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "id": "F4PLXGGMyAWg"
      },
      "outputs": [],
      "source": [
        "%%capture\n",
        "# Installs Unsloth, Xformers (Flash Attention) and all other packages!.\n",
        "!pip install \"unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git\"\n",
        "!pip install --no-deps \"xformers<0.0.26\" trl peft accelerate bitsandbytes\n",
        "!pip install langchain_community neo4j langchain langchain_groq"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "0ManSe_OzVd1"
      },
      "source": [
        "# Initial Set Up"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 7,
      "metadata": {
        "id": "CkpDztOjvZgp"
      },
      "outputs": [],
      "source": [
        "from langchain_community.graphs import Neo4jGraph\n",
        "from langchain_groq import ChatGroq\n",
        "from langchain.chains import GraphCypherQAChain\n",
        "from google.colab import userdata\n",
        "\n",
        "groq_api_key = userdata.get('GROQ_API')\n",
        "hf_api = userdata.get('HF_API')\n",
        "\n",
        "#https://demo.neo4jlabs.com:7473/browser/\n",
        "DEMO_URL = \"neo4j+s://demo.neo4jlabs.com\"\n",
        "database = \"recommendations\""
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 9,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "hNGG_L84vkYG",
        "outputId": "790c6eac-5026-470b-bf57-a743fc0b5c96"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Node properties:\n",
            "Movie {posterEmbedding: LIST, url: STRING, runtime: INTEGER, revenue: INTEGER, budget: INTEGER, plotEmbedding: LIST, imdbRating: FLOAT, released: STRING, countries: LIST, languages: LIST, plot: STRING, imdbVotes: INTEGER, imdbId: STRING, year: INTEGER, poster: STRING, movieId: STRING, tmdbId: STRING, title: STRING}\n",
            "Genre {name: STRING}\n",
            "User {userId: STRING, name: STRING}\n",
            "Actor {url: STRING, bornIn: STRING, bio: STRING, died: DATE, born: DATE, imdbId: STRING, name: STRING, poster: STRING, tmdbId: STRING}\n",
            "Director {url: STRING, bornIn: STRING, born: DATE, died: DATE, tmdbId: STRING, imdbId: STRING, name: STRING, poster: STRING, bio: STRING}\n",
            "Person {url: STRING, died: DATE, bornIn: STRING, born: DATE, imdbId: STRING, name: STRING, poster: STRING, tmdbId: STRING, bio: STRING}\n",
            "Relationship properties:\n",
            "RATED {rating: FLOAT, timestamp: INTEGER}\n",
            "ACTED_IN {role: STRING}\n",
            "DIRECTED {role: STRING}\n",
            "The relationships:\n",
            "(:Movie)-[:IN_GENRE]->(:Genre)\n",
            "(:User)-[:RATED]->(:Movie)\n",
            "(:Actor)-[:ACTED_IN]->(:Movie)\n",
            "(:Actor)-[:DIRECTED]->(:Movie)\n",
            "(:Director)-[:DIRECTED]->(:Movie)\n",
            "(:Director)-[:ACTED_IN]->(:Movie)\n",
            "(:Person)-[:ACTED_IN]->(:Movie)\n",
            "(:Person)-[:DIRECTED]->(:Movie)\n"
          ]
        }
      ],
      "source": [
        "graph = Neo4jGraph(url=DEMO_URL,database=database,username=database,password=database,sanitize=True)\n",
        "print(graph.schema)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Wk2VFqRNwDsL"
      },
      "source": [
        "New Update from Langchain (09/05/24): an enhanced schema parameter representation that samples the database values and return them to the LLM to be able to generate more accurate Cypher statements\n",
        "\n",
        "https://python.langchain.com/v0.1/docs/integrations/graphs/neo4j_cypher/#enhanced-schema-information"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "rU0YlfguyNOG",
        "outputId": "10e8102c-75e0-469e-a749-357ad1a2134a"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Node properties:\n",
            "- **Movie**\n",
            "  - `url`: STRING Example: \"https://themoviedb.org/movie/862\"\n",
            "  - `runtime`: INTEGER Min: 2, Max: 910\n",
            "  - `revenue`: INTEGER Min: 1, Max: 2787965087\n",
            "  - `budget`: INTEGER Min: 1, Max: 380000000\n",
            "  - `imdbRating`: FLOAT Min: 1.6, Max: 9.6\n",
            "  - `released`: STRING Example: \"1995-11-22\"\n",
            "  - `countries`: LIST Min Size: 1, Max Size: 16\n",
            "  - `languages`: LIST Min Size: 1, Max Size: 19\n",
            "  - `plot`: STRING Example: \"A cowboy doll is profoundly threatened and jealous\"\n",
            "  - `imdbVotes`: INTEGER Min: 13, Max: 1626900\n",
            "  - `imdbId`: STRING Example: \"0114709\"\n",
            "  - `year`: INTEGER Min: 1902, Max: 2016\n",
            "  - `poster`: STRING Example: \"https://image.tmdb.org/t/p/w440_and_h660_face/uXDf\"\n",
            "  - `movieId`: STRING Example: \"1\"\n",
            "  - `tmdbId`: STRING Example: \"862\"\n",
            "  - `title`: STRING Example: \"Toy Story\"\n",
            "- **Genre**\n",
            "  - `name`: STRING Example: \"Adventure\"\n",
            "- **User**\n",
            "  - `userId`: STRING Example: \"1\"\n",
            "  - `name`: STRING Example: \"Omar Huffman\"\n",
            "- **Actor**\n",
            "  - `url`: STRING Example: \"https://themoviedb.org/person/1271225\"\n",
            "  - `bornIn`: STRING Example: \"France\"\n",
            "  - `bio`: STRING Example: \"​From Wikipedia, the free encyclopedia  Lillian Di\"\n",
            "  - `died`: DATE Example: \"1954-01-01\"\n",
            "  - `born`: DATE Example: \"1877-02-04\"\n",
            "  - `imdbId`: STRING Example: \"2083046\"\n",
            "  - `name`: STRING Example: \"François Lallement\"\n",
            "  - `poster`: STRING Example: \"https://image.tmdb.org/t/p/w440_and_h660_face/6DCW\"\n",
            "  - `tmdbId`: STRING Example: \"1271225\"\n",
            "- **Director**\n",
            "  - `url`: STRING Example: \"https://themoviedb.org/person/88953\"\n",
            "  - `bornIn`: STRING Example: \"Burchard, Nebraska, USA\"\n",
            "  - `bio`: STRING Example: \"Harold Lloyd has been called the cinema’s “first m\"\n",
            "  - `died`: DATE Min: 1930-08-26, Max: 2976-09-29\n",
            "  - `born`: DATE Min: 1861-12-08, Max: 2018-05-01\n",
            "  - `imdbId`: STRING Example: \"0516001\"\n",
            "  - `name`: STRING Example: \"Harold Lloyd\"\n",
            "  - `poster`: STRING Example: \"https://image.tmdb.org/t/p/w440_and_h660_face/er4Z\"\n",
            "  - `tmdbId`: STRING Example: \"88953\"\n",
            "- **Person**\n",
            "  - `url`: STRING Example: \"https://themoviedb.org/person/1271225\"\n",
            "  - `bornIn`: STRING Example: \"France\"\n",
            "  - `bio`: STRING Example: \"​From Wikipedia, the free encyclopedia  Lillian Di\"\n",
            "  - `died`: DATE Example: \"1954-01-01\"\n",
            "  - `born`: DATE Example: \"1877-02-04\"\n",
            "  - `imdbId`: STRING Example: \"2083046\"\n",
            "  - `name`: STRING Example: \"François Lallement\"\n",
            "  - `poster`: STRING Example: \"https://image.tmdb.org/t/p/w440_and_h660_face/6DCW\"\n",
            "  - `tmdbId`: STRING Example: \"1271225\"\n",
            "Relationship properties:\n",
            "- **RATED**\n",
            "  - `rating: FLOAT` Example: \"2.0\"\n",
            "  - `timestamp: INTEGER` Example: \"1260759108\"\n",
            "- **ACTED_IN**\n",
            "  - `role: STRING` Example: \"Officer of the Marines (uncredited)\"\n",
            "- **DIRECTED**\n",
            "  - `role: STRING` \n",
            "The relationships:\n",
            "(:Movie)-[:IN_GENRE]->(:Genre)\n",
            "(:User)-[:RATED]->(:Movie)\n",
            "(:Actor)-[:ACTED_IN]->(:Movie)\n",
            "(:Actor)-[:DIRECTED]->(:Movie)\n",
            "(:Director)-[:DIRECTED]->(:Movie)\n",
            "(:Director)-[:ACTED_IN]->(:Movie)\n",
            "(:Person)-[:ACTED_IN]->(:Movie)\n",
            "(:Person)-[:DIRECTED]->(:Movie)\n"
          ]
        }
      ],
      "source": [
        "graph = Neo4jGraph(url=DEMO_URL,database=database,username=database,password=database,sanitize=True,enhanced_schema=True)\n",
        "print(graph.schema)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "coN4EuuIzZEG"
      },
      "source": [
        "# Testing"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "metadata": {
        "id": "6NkfdJgsvuYs"
      },
      "outputs": [],
      "source": [
        "model = ChatGroq(temperature=0, model_name=\"llama3-8b-8192\", groq_api_key = groq_api_key)\n",
        "chain = GraphCypherQAChain.from_llm(graph=graph, llm=model, verbose=True)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 11,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "rlk41yoLwrMO",
        "outputId": "d97ec0e1-6b7f-4318-e914-0c2c486348e0"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "\n",
            " Who is the oldest director?\n",
            "\n",
            "\n",
            "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n",
            "Generated Cypher:\n",
            "\u001b[32;1m\u001b[1;3mMATCH (d:Director)-[:born]->(b) RETURN d.name AS director, b AS birthdate ORDER BY b ASC LIMIT 1;\u001b[0m\n",
            "Full Context:\n",
            "\u001b[32;1m\u001b[1;3m[]\u001b[0m\n",
            "\n",
            "\u001b[1m> Finished chain.\u001b[0m\n",
            "I don't know the answer.\n",
            "\n",
            " Find all directors who have directed a movie in Spanish language.\n",
            "\n",
            "\n",
            "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n",
            "Generated Cypher:\n",
            "\u001b[32;1m\u001b[1;3mMATCH (d:Director)-[:DIRECTED]->(m:Movie)-[:IN_GENRE]->(g:Genre)<-[:IN_GENRE]-(m2:Movie)<-[:LANGUAGES]-(l:Language) WHERE l.name = 'Spanish' RETURN d;\u001b[0m\n",
            "Full Context:\n",
            "\u001b[32;1m\u001b[1;3m[]\u001b[0m\n",
            "\n",
            "\u001b[1m> Finished chain.\u001b[0m\n",
            "I don't know the answer.\n",
            "\n",
            " Give me 5 movies where a director has also acted?\n",
            "\n",
            "\n",
            "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n",
            "Generated Cypher:\n",
            "\u001b[32;1m\u001b[1;3mMATCH (d:Director)-[:ACTED_IN]->(m:Movie) RETURN m LIMIT 5;\u001b[0m\n",
            "Full Context:\n",
            "\u001b[32;1m\u001b[1;3m[{'m': {'languages': ['English'], 'year': 1919, 'imdbId': '0009932', 'runtime': 12, 'imdbRating': 6.1, 'movieId': '72626', 'countries': ['USA'], 'imdbVotes': 503, 'title': 'Billy Blazes, Esq.', 'url': 'https://themoviedb.org/movie/53516', 'tmdbId': '53516', 'plot': 'Billy Blazes confronts Crooked Charley, who has been ruling the town of Peaceful Vale through fear and violence.', 'released': '1919-07-06'}}, {'m': {'languages': ['English'], 'year': 1925, 'imdbId': '0015841', 'runtime': 76, 'imdbRating': 7.6, 'movieId': '25752', 'countries': ['USA'], 'imdbVotes': 3517, 'title': 'Freshman, The', 'url': 'https://themoviedb.org/movie/42359', 'tmdbId': '42359', 'plot': 'Nerdy college student will do anything to become popular on campus.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/yJjyEOHp1dpspruvcY4jL4gydoL.jpg', 'released': '1925-09-20'}}, {'m': {'languages': ['English'], 'year': 1923, 'imdbId': '0014429', 'runtime': 70, 'imdbRating': 8.3, 'movieId': '8235', 'countries': ['USA'], 'imdbVotes': 12476, 'title': 'Safety Last!', 'url': 'https://themoviedb.org/movie/22596', 'revenue': 623, 'tmdbId': '22596', 'plot': 'When a store clerk organizes a publicity stunt, in which a friend climbs the outside of a tall building, circumstances force him to make the perilous climb himself.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/jWoeNjQPtRZJbS0LRPesY9uizgS.jpg', 'released': '1923-04-01'}}, {'m': {'languages': ['English'], 'year': 1927, 'imdbId': '0018051', 'runtime': 82, 'imdbRating': 7.6, 'movieId': '8423', 'countries': ['USA'], 'imdbVotes': 2652, 'title': 'Kid Brother, The', 'url': 'https://themoviedb.org/movie/16661', 'tmdbId': '16661', 'plot': \"The most important family in Hickoryville is (naturally enough) the Hickorys, with sheriff Jim and his tough manly sons Leo and Olin. The timid youngest son, Harold, doesn't have the ...\", 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/wxh7Iq6Ng0tNjHbNLviNROyhL3M.jpg', 'released': '1927-01-17'}}, {'m': {'year': 1920, 'imdbId': '0011237', 'runtime': 91, 'imdbRating': 7.2, 'movieId': '25737', 'countries': ['Germany'], 'imdbVotes': 4655, 'title': 'Golem, The (Golem, wie er in die Welt kam, Der)', 'url': 'https://themoviedb.org/movie/2972', 'tmdbId': '2972', 'plot': 'In 16th-century Prague, a rabbi creates a giant creature from clay, called the Golem, and using sorcery, brings the creature to life in order to protect the Jews of Prague from persecution.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/PWKZx0gLB7EEMQUmWbvFk3yB3t.jpg', 'released': '1921-06-19'}}]\u001b[0m\n",
            "\n",
            "\u001b[1m> Finished chain.\u001b[0m\n",
            "I couldn't find any information that suggests any of the movies listed have a director who also acted in the film.\n",
            "\n",
            " List all movies with an IMDb rating greater than 5 that have been directed by a director born in China.\n",
            "\n",
            "\n",
            "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n",
            "Generated Cypher:\n",
            "\u001b[32;1m\u001b[1;3mMATCH (m:Movie)-[:DIRECTED]->(d:Director)-[:bornIn]->(\"China\")-[:born]->(b:Date) WHERE m.imdbRating > 5 RETURN m;\u001b[0m\n"
          ]
        }
      ],
      "source": [
        "questions = [\"Who is the oldest director?\",\n",
        "             \"Find all directors who have directed a movie in Spanish language.\",\n",
        "             \"Give me 5 movies where a director has also acted?\",\n",
        "             \"List all movies with an IMDb rating greater than 5 that have been directed by a director born in China.\"\n",
        "             ]\n",
        "\n",
        "# POSSIBLE CORRECT CYPHER QUERY\n",
        "# 1. MATCH (d:Director) WHERE d.born IS NOT NULL RETURN d ORDER BY d.born ASC LIMIT 1\n",
        "# 2. MATCH (d:Director)-[:DIRECTED]->(m:Movie) WHERE 'Spanish' IN m.languages RETURN d.name\n",
        "# 3. MATCH (d:Director)-[:ACTED_IN]->(m:Movie) WHERE exists{ (d)-[:DIRECTED]->(m) } RETURN m.title AS MovieTitle, m.movieId AS MovieID LIMIT 5\n",
        "# 4. MATCH (m:Movie)<-[:DIRECTED]-(d:Director) WHERE m.imdbRating > 5 AND d.bornIn = 'China' RETURN m\n",
        "\n",
        "for q in questions:\n",
        "    print(\"\\n\", q)\n",
        "    try:\n",
        "        result = chain.invoke(q)['result']\n",
        "        print(result)\n",
        "    except:\n",
        "        pass"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "BZOkP-FIwb-2"
      },
      "source": [
        "New Update from Langchain (09/05/2024): use validate_cypher parameter with enhanced schema parameter to get the best results"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 4,
      "metadata": {
        "id": "g5fuJqRzysMi"
      },
      "outputs": [],
      "source": [
        "model = ChatGroq(temperature=0, model_name=\"llama3-8b-8192\", groq_api_key = groq_api_key)\n",
        "chain = GraphCypherQAChain.from_llm(graph=graph, llm=model, verbose=True, validate_cypher = True)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "LRD1_m5dswEk",
        "outputId": "dafeeb61-2788-425b-9959-52a992b819aa"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "\n",
            " Who is the oldest director?\n",
            "\n",
            "\n",
            "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n",
            "Generated Cypher:\n",
            "\u001b[32;1m\u001b[1;3m\u001b[0m\n",
            "Full Context:\n",
            "\u001b[32;1m\u001b[1;3m[]\u001b[0m\n",
            "\n",
            "\u001b[1m> Finished chain.\u001b[0m\n",
            "I don't know the answer.\n",
            "\n",
            " Find all directors who have directed a movie in Spanish language.\n",
            "\n",
            "\n",
            "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n",
            "Generated Cypher:\n",
            "\u001b[32;1m\u001b[1;3m\u001b[0m\n",
            "Full Context:\n",
            "\u001b[32;1m\u001b[1;3m[]\u001b[0m\n",
            "\n",
            "\u001b[1m> Finished chain.\u001b[0m\n",
            "I don't know the answer.\n",
            "\n",
            " Give me 5 movies where a director has also acted?\n",
            "\n",
            "\n",
            "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n",
            "Generated Cypher:\n",
            "\u001b[32;1m\u001b[1;3mMATCH (d:Director)-[:ACTED_IN]->(m:Movie) RETURN m LIMIT 5;\u001b[0m\n",
            "Full Context:\n",
            "\u001b[32;1m\u001b[1;3m[{'m': {'languages': ['English'], 'year': 1919, 'imdbId': '0009932', 'runtime': 12, 'imdbRating': 6.1, 'movieId': '72626', 'countries': ['USA'], 'imdbVotes': 503, 'title': 'Billy Blazes, Esq.', 'url': 'https://themoviedb.org/movie/53516', 'tmdbId': '53516', 'plot': 'Billy Blazes confronts Crooked Charley, who has been ruling the town of Peaceful Vale through fear and violence.', 'released': '1919-07-06'}}, {'m': {'languages': ['English'], 'year': 1925, 'imdbId': '0015841', 'runtime': 76, 'imdbRating': 7.6, 'movieId': '25752', 'countries': ['USA'], 'imdbVotes': 3517, 'title': 'Freshman, The', 'url': 'https://themoviedb.org/movie/42359', 'tmdbId': '42359', 'plot': 'Nerdy college student will do anything to become popular on campus.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/yJjyEOHp1dpspruvcY4jL4gydoL.jpg', 'released': '1925-09-20'}}, {'m': {'languages': ['English'], 'year': 1923, 'imdbId': '0014429', 'runtime': 70, 'imdbRating': 8.3, 'movieId': '8235', 'countries': ['USA'], 'imdbVotes': 12476, 'title': 'Safety Last!', 'url': 'https://themoviedb.org/movie/22596', 'revenue': 623, 'tmdbId': '22596', 'plot': 'When a store clerk organizes a publicity stunt, in which a friend climbs the outside of a tall building, circumstances force him to make the perilous climb himself.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/jWoeNjQPtRZJbS0LRPesY9uizgS.jpg', 'released': '1923-04-01'}}, {'m': {'languages': ['English'], 'year': 1927, 'imdbId': '0018051', 'runtime': 82, 'imdbRating': 7.6, 'movieId': '8423', 'countries': ['USA'], 'imdbVotes': 2652, 'title': 'Kid Brother, The', 'url': 'https://themoviedb.org/movie/16661', 'tmdbId': '16661', 'plot': \"The most important family in Hickoryville is (naturally enough) the Hickorys, with sheriff Jim and his tough manly sons Leo and Olin. The timid youngest son, Harold, doesn't have the ...\", 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/wxh7Iq6Ng0tNjHbNLviNROyhL3M.jpg', 'released': '1927-01-17'}}, {'m': {'year': 1920, 'imdbId': '0011237', 'runtime': 91, 'imdbRating': 7.2, 'movieId': '25737', 'countries': ['Germany'], 'imdbVotes': 4655, 'title': 'Golem, The (Golem, wie er in die Welt kam, Der)', 'url': 'https://themoviedb.org/movie/2972', 'tmdbId': '2972', 'plot': 'In 16th-century Prague, a rabbi creates a giant creature from clay, called the Golem, and using sorcery, brings the creature to life in order to protect the Jews of Prague from persecution.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/PWKZx0gLB7EEMQUmWbvFk3yB3t.jpg', 'released': '1921-06-19'}}]\u001b[0m\n",
            "\n",
            "\u001b[1m> Finished chain.\u001b[0m\n",
            "I couldn't find any information that suggests any of the movies listed have a director who also acted in the film.\n",
            "\n",
            " List all movies with an IMDb rating greater than 5 that have been directed by a director born in China.\n",
            "\n",
            "\n",
            "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n",
            "Generated Cypher:\n",
            "\u001b[32;1m\u001b[1;3m\u001b[0m\n",
            "Full Context:\n",
            "\u001b[32;1m\u001b[1;3m[]\u001b[0m\n",
            "\n",
            "\u001b[1m> Finished chain.\u001b[0m\n",
            "I don't know the answer.\n"
          ]
        }
      ],
      "source": [
        "questions = [\"Who is the oldest director?\",\n",
        "             \"Find all directors who have directed a movie in Spanish language.\",\n",
        "             \"Give me 5 movies where a director has also acted?\",\n",
        "             \"List all movies with an IMDb rating greater than 5 that have been directed by a director born in China.\"\n",
        "             ]\n",
        "\n",
        "for q in questions:\n",
        "    print(\"\\n\", q)\n",
        "    try:\n",
        "        result = chain.invoke(q)['result']\n",
        "        print(result)\n",
        "    except:\n",
        "        pass"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "mX_QzqjJzNgT"
      },
      "source": [
        "# Fine Tuning using Unsloth"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "okuTYrOfzQeU"
      },
      "source": [
        "The code below is from the Unsloth repository: https://colab.research.google.com/drive/135ced7oHytdxu3N2DNe1Z0kqjyYIkDXp?usp=sharing"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 12,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 408,
          "referenced_widgets": [
            "f3300f1dd2e247a993f5fa9cfa367f96",
            "5283ee999cff4ef7988963f075235f67",
            "d093deaa67d241d69faead13116ac4f2",
            "c41782aa2e9c48debd17126636e2a4ab",
            "e5878ba6021b4073bf9903c0e7f164a1",
            "d52d3dcaaef74e33813c180f38de8aa8",
            "d3e78e54a6d84b13871feecf4746c845",
            "d18e8adf1bbe48628736d8d57cf0ffe5",
            "ac38d6c97db74a84a4e9107260e0ecb5",
            "73c3659fe4c74ed69b08ab5129b351a4",
            "e83b822678344d14876a692d0f227307",
            "f5a71ef02778442e9fabd6274d517018",
            "8c3039ccb753467389d8a1dca0db6b22",
            "1cb84a294b8b4ca0b1d91ab8acc5ce69",
            "e73a5ac63da941749b18b80ce3b96768",
            "d1004b680c8241a7ac4ab5d815321dc2",
            "63acc720749e4002af6bb70a7555d484",
            "47e7d63ce36a40a7a796607c33bb413a",
            "38714087cbdc47528f72620204620014",
            "6cfec3520fd04454821a28907eeafb09",
            "f8d29feaf85f479f8ba893c9deae9c1a",
            "70c986563aa446709b0810f6dddbc229",
            "24c723f8d1394206803ee0d34c97bef7",
            "2d0b443a35a240b1b6b0db538ead123d",
            "1408019b5fe94bd6a084a0c58d4223c4",
            "9599621998f14b3c8caa0c7807139d79",
            "d9bbae2cab69446bb8fe8cfe1458c338",
            "b0c10a720e13411db76b2fe175533fbb",
            "7190a95d9ab64642bd87c63800ef7655",
            "f08dea2fd8c84ca7879448c8e633367e",
            "854bf74bd388412790f106b7988dac22",
            "30a641e46f8e4a8b86ec1cf916dcabb3",
            "e65ade3b822442f79386a11c390cb7fe",
            "8755cee22aa14e49843331d0654c8bf9",
            "8afc7bf55fa04e2aa1777d92bee793b4",
            "875d73dc4f584276a358a2dfeee9f935",
            "d546be138e7241b6ab64910801c2556c",
            "6e3e9d06fdb94c78be3830fd1d85ad59",
            "9e019ce56c7c4c988c6144216a032873",
            "891d5db064214416a023c456266792aa",
            "2476aedd495542c99b0b5e5b20fc58c9",
            "f9be1fea20bd4046a905937c17b6b284",
            "c20fa5d6dee041a1ac71efe32796c85f",
            "689ba35c1e1f43caaf84590b9a3f3071",
            "0d2fe13aad9a4fff9662dcf80c8fca7b",
            "ce4e97ffcfb345a6a1bfbc182724354f",
            "113971d307b34a149322c01274c70f51",
            "e72f744efa71493cb13d0a89e216f786",
            "6b7a3f62c6cd401886b099bd7a4094d0",
            "cff1bd7801c64c5e8855770d876862d6",
            "16845c66d22c46b2af1323b79c200b52",
            "88f2ba93a4804b63a167fc4fea2676f7",
            "adcf95dfc89242d886ae6df8cf70c00a",
            "acb5aaf865ac4d38b88c863b6a1b16b5",
            "dd8f20f94a1b495aa705d87bc4cf7793",
            "69b333765def46349c96fc396716bcbb",
            "134d5c5f2b014480a1dfbeab19f595a8",
            "ffcfe7bd907d4ddcaa5940934c2775d5",
            "032fc9d566704728a4cb92ca5e75819a",
            "7d2c0091ff2148a59c6b5b2a9aec05d8",
            "f347ec9c387c4d7ebd6eb05604aa330e",
            "5134bfef1d214538a51513a47d41b767",
            "409400bcba7347c68e5e431e6d7aa4c1",
            "f0fbcce4116a4a2687a84834ada80e98",
            "fd8151cb82e04b31a577d9a03974f796",
            "82b6dc8229da45d38e8ac7ea1671cda7"
          ]
        },
        "id": "fOCRSYLNzM9D",
        "outputId": "0905a154-1cfa-4e13-d557-64363645ec71"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n",
            "  warnings.warn(\n"
          ]
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "f3300f1dd2e247a993f5fa9cfa367f96",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "config.json:   0%|          | 0.00/1.18k [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "==((====))==  Unsloth: Fast Llama patching release 2024.4\n",
            "   \\\\   /|    GPU: Tesla T4. Max memory: 14.748 GB. Platform = Linux.\n",
            "O^O/ \\_/ \\    Pytorch: 2.2.1+cu121. CUDA = 7.5. CUDA Toolkit = 12.1.\n",
            "\\        /    Bfloat16 = FALSE. Xformers = 0.0.25.post1. FA = False.\n",
            " \"-____-\"     Free Apache license: http://github.com/unslothai/unsloth\n"
          ]
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Unused kwargs: ['_load_in_4bit', '_load_in_8bit', 'quant_method']. These kwargs are not used in <class 'transformers.utils.quantization_config.BitsAndBytesConfig'>.\n"
          ]
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "f5a71ef02778442e9fabd6274d517018",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "model.safetensors:   0%|          | 0.00/5.70G [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "24c723f8d1394206803ee0d34c97bef7",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "generation_config.json:   0%|          | 0.00/172 [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "8755cee22aa14e49843331d0654c8bf9",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "tokenizer_config.json:   0%|          | 0.00/50.6k [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "0d2fe13aad9a4fff9662dcf80c8fca7b",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "tokenizer.json:   0%|          | 0.00/9.09M [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "69b333765def46349c96fc396716bcbb",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "special_tokens_map.json:   0%|          | 0.00/464 [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n",
            "Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"
          ]
        }
      ],
      "source": [
        "from unsloth import FastLanguageModel\n",
        "import torch\n",
        "max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!\n",
        "dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+\n",
        "load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.\n",
        "\n",
        "model, tokenizer = FastLanguageModel.from_pretrained(\n",
        "    model_name = \"unsloth/llama-3-8b-bnb-4bit\",\n",
        "    max_seq_length = max_seq_length,\n",
        "    dtype = dtype,\n",
        "    load_in_4bit = load_in_4bit,\n",
        "    # token = \"hf_...\", # use one if using gated models like meta-llama/Llama-2-7b-hf\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "R68p9eVbzopk"
      },
      "source": [
        "Adding LORA"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 13,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "1NTU0RdjzkQh",
        "outputId": "8c7b2690-9889-4341-ed4a-f910bf3feae8"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Unsloth 2024.4 patched 32 layers with 32 QKV layers, 32 O layers and 32 MLP layers.\n"
          ]
        }
      ],
      "source": [
        "model = FastLanguageModel.get_peft_model(\n",
        "    model,\n",
        "    r = 16, # Choose any number > 0 ! Suggested 8, 16, 32, 64, 128\n",
        "    target_modules = [\"q_proj\", \"k_proj\", \"v_proj\", \"o_proj\",\n",
        "                      \"gate_proj\", \"up_proj\", \"down_proj\",],\n",
        "    lora_alpha = 16,\n",
        "    lora_dropout = 0, # Supports any, but = 0 is optimized\n",
        "    bias = \"none\",    # Supports any, but = \"none\" is optimized\n",
        "    # [NEW] \"unsloth\" uses 30% less VRAM, fits 2x larger batch sizes!\n",
        "    use_gradient_checkpointing = \"unsloth\", # True or \"unsloth\" for very long context\n",
        "    random_state = 3407,\n",
        "    use_rslora = False,  # We support rank stabilized LoRA\n",
        "    loftq_config = None, # And LoftQ\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "yWZsXETt0GKr"
      },
      "source": [
        "## Create a dataset"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 14,
      "metadata": {
        "id": "M5NUqz2o0N7p"
      },
      "outputs": [],
      "source": [
        "prompt = \"\"\"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n",
        "\n",
        "### Instruction:\n",
        "{}\n",
        "\n",
        "### Input:\n",
        "{}\n",
        "\n",
        "### Response:\n",
        "{}\"\"\"\n",
        "\n",
        "EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN\n",
        "def formatting_prompts_func(examples):\n",
        "    instructions = f\"Convert text to cypher query based on this schema: {graph.schema}\"\n",
        "    inputs       = examples[\"input\"]\n",
        "    outputs      = examples[\"output\"]\n",
        "    texts = []\n",
        "    for input, output in zip(inputs, outputs):\n",
        "        # Must add EOS_TOKEN, otherwise your generation will go on forever!\n",
        "        text = prompt.format(instructions, input, output) + EOS_TOKEN\n",
        "        texts.append(text)\n",
        "    return { \"text\" : texts, }\n",
        "pass"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Kz70bBgd0bE5"
      },
      "source": [
        "Load data from HuggingFace"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "6J0IEdjZ0X_6",
        "outputId": "b909e790-4343-4e01-ce3f-2968536470a1"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "Dataset({\n",
              "    features: ['output', 'input', 'instruction', 'text'],\n",
              "    num_rows: 51760\n",
              "})"
            ]
          },
          "execution_count": 12,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "from datasets import load_dataset\n",
        "dataset = load_dataset(\"yahma/alpaca-cleaned\", split = \"train\")\n",
        "dataset = dataset.map(formatting_prompts_func, batched = True,)\n",
        "dataset"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "RI1Hyx0a0f3b"
      },
      "source": [
        "Load our own data\n",
        "\n",
        "we're going to use: https://github.com/tomasonjo/text2cypher/blob/main/datasets/synthetic_gpt4turbo_demodbs/text2cypher_gpt4turbo.csv"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 15,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 597
        },
        "id": "bnZRaa3N00Je",
        "outputId": "6ea4cba6-da5a-449c-8417-bc4a6fb9bb2c"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.google.colaboratory.intrinsic+json": {
              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 762,\n  \"fields\": [\n    {\n      \"column\": \"question\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 741,\n        \"samples\": [\n          \"List the top 3 directors by the number of movies directed.\",\n          \"Which genres have the most movies with a runtime over 120 minutes?\",\n          \"List the top 5 movies with the highest IMDb rating.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"cypher\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 673,\n        \"samples\": [\n          \"MATCH (m:Movie)\\nWHERE m.released < \\\"2010-01-01\\\" AND m.revenue IS NOT NULL\\nRETURN m\\nORDER BY m.revenue DESC\\nLIMIT 5\",\n          \"MATCH (d:Director)-[:DIRECTED]->(m:Movie)-[:IN_GENRE]->(g:Genre {name: 'Action'})\\nWITH d, count(m) AS moviesDirected\\nORDER BY moviesDirected DESC\\nLIMIT 5\\nRETURN d.name, moviesDirected\",\n          \"MATCH (d:Director)-[:DIRECTED]->(m:Movie)\\nWITH d, collect(DISTINCT m.languages) AS languages\\nWHERE size(languages) > 3\\nRETURN d.name, languages\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"type\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 6,\n        \"samples\": [\n          \"Simple Retrieval Queries\",\n          \"Verbose query\",\n          \"Pathfinding Queries\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"database\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"recommendations\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"syntax_error\",\n      \"properties\": {\n        \"dtype\": \"boolean\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          false\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"timeout\",\n      \"properties\": {\n        \"dtype\": \"boolean\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          false\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"returns_results\",\n      \"properties\": {\n        \"dtype\": \"boolean\",\n        \"num_unique_values\": 2,\n        \"samples\": [\n          false\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"false_schema\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 12,\n        \"samples\": [\n          \"User.rating\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}",
              "type": "dataframe",
              "variable_name": "df"
            },
            "text/html": [
              "\n",
              "  <div id=\"df-4826a635-2186-4807-a8da-d34bb3c5e05f\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>question</th>\n",
              "      <th>cypher</th>\n",
              "      <th>type</th>\n",
              "      <th>database</th>\n",
              "      <th>syntax_error</th>\n",
              "      <th>timeout</th>\n",
              "      <th>returns_results</th>\n",
              "      <th>false_schema</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>7275</th>\n",
              "      <td>What are the top 5 movies with a runtime great...</td>\n",
              "      <td>MATCH (m:Movie)\\nWHERE m.runtime &gt; 120\\nRETURN...</td>\n",
              "      <td>Simple Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7276</th>\n",
              "      <td>List the first 3 genres with movies having an ...</td>\n",
              "      <td>MATCH (m:Movie)-[:IN_GENRE]-&gt;(g:Genre)\\nWHERE ...</td>\n",
              "      <td>Verbose query</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7277</th>\n",
              "      <td>List the first 5 directors who have a biograph...</td>\n",
              "      <td>MATCH (d:Director)\\nWHERE d.bio IS NOT NULL\\nR...</td>\n",
              "      <td>Simple Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7278</th>\n",
              "      <td>Which 3 movies have the most detailed plot des...</td>\n",
              "      <td>MATCH (m:Movie)\\nRETURN m.title, m.plot\\nORDER...</td>\n",
              "      <td>Simple Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7279</th>\n",
              "      <td>Show the top 5 actors who have acted in movies...</td>\n",
              "      <td>MATCH (a:Actor)-[:ACTED_IN]-&gt;(m:Movie)&lt;-[:DIRE...</td>\n",
              "      <td>Simple Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8067</th>\n",
              "      <td>Which movies have been acted in by more than 1...</td>\n",
              "      <td>MATCH (a:Actor)-[:ACTED_IN]-&gt;(m:Movie)\\nWITH m...</td>\n",
              "      <td>Complex Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8068</th>\n",
              "      <td>Find all movies where the director has directe...</td>\n",
              "      <td>MATCH (d:Director)-[:DIRECTED]-&gt;(m:Movie)\\nWIT...</td>\n",
              "      <td>Complex Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8069</th>\n",
              "      <td>Find all movies that have a plot mentioning 'h...</td>\n",
              "      <td>MATCH (m:Movie)\\nWHERE m.plot CONTAINS 'hero'\\...</td>\n",
              "      <td>Complex Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8070</th>\n",
              "      <td>Which movies have been rated the highest by us...</td>\n",
              "      <td>MATCH (u:User)-[r:RATED]-&gt;(m:Movie)\\nWITH u, c...</td>\n",
              "      <td>Complex Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8071</th>\n",
              "      <td>List the top 5 oldest directors in the database.</td>\n",
              "      <td>MATCH (d:Director)\\nWHERE d.born IS NOT NULL\\n...</td>\n",
              "      <td>Complex Retrieval Queries</td>\n",
              "      <td>recommendations</td>\n",
              "      <td>False</td>\n",
              "      <td>False</td>\n",
              "      <td>True</td>\n",
              "      <td>NaN</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>762 rows × 8 columns</p>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-4826a635-2186-4807-a8da-d34bb3c5e05f')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-4826a635-2186-4807-a8da-d34bb3c5e05f button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-4826a635-2186-4807-a8da-d34bb3c5e05f');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-0b5942da-583b-4062-842f-22644819282c\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-0b5942da-583b-4062-842f-22644819282c')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-0b5942da-583b-4062-842f-22644819282c button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "text/plain": [
              "                                               question  \\\n",
              "7275  What are the top 5 movies with a runtime great...   \n",
              "7276  List the first 3 genres with movies having an ...   \n",
              "7277  List the first 5 directors who have a biograph...   \n",
              "7278  Which 3 movies have the most detailed plot des...   \n",
              "7279  Show the top 5 actors who have acted in movies...   \n",
              "...                                                 ...   \n",
              "8067  Which movies have been acted in by more than 1...   \n",
              "8068  Find all movies where the director has directe...   \n",
              "8069  Find all movies that have a plot mentioning 'h...   \n",
              "8070  Which movies have been rated the highest by us...   \n",
              "8071   List the top 5 oldest directors in the database.   \n",
              "\n",
              "                                                 cypher  \\\n",
              "7275  MATCH (m:Movie)\\nWHERE m.runtime > 120\\nRETURN...   \n",
              "7276  MATCH (m:Movie)-[:IN_GENRE]->(g:Genre)\\nWHERE ...   \n",
              "7277  MATCH (d:Director)\\nWHERE d.bio IS NOT NULL\\nR...   \n",
              "7278  MATCH (m:Movie)\\nRETURN m.title, m.plot\\nORDER...   \n",
              "7279  MATCH (a:Actor)-[:ACTED_IN]->(m:Movie)<-[:DIRE...   \n",
              "...                                                 ...   \n",
              "8067  MATCH (a:Actor)-[:ACTED_IN]->(m:Movie)\\nWITH m...   \n",
              "8068  MATCH (d:Director)-[:DIRECTED]->(m:Movie)\\nWIT...   \n",
              "8069  MATCH (m:Movie)\\nWHERE m.plot CONTAINS 'hero'\\...   \n",
              "8070  MATCH (u:User)-[r:RATED]->(m:Movie)\\nWITH u, c...   \n",
              "8071  MATCH (d:Director)\\nWHERE d.born IS NOT NULL\\n...   \n",
              "\n",
              "                           type         database  syntax_error  timeout  \\\n",
              "7275   Simple Retrieval Queries  recommendations         False    False   \n",
              "7276              Verbose query  recommendations         False    False   \n",
              "7277   Simple Retrieval Queries  recommendations         False    False   \n",
              "7278   Simple Retrieval Queries  recommendations         False    False   \n",
              "7279   Simple Retrieval Queries  recommendations         False    False   \n",
              "...                         ...              ...           ...      ...   \n",
              "8067  Complex Retrieval Queries  recommendations         False    False   \n",
              "8068  Complex Retrieval Queries  recommendations         False    False   \n",
              "8069  Complex Retrieval Queries  recommendations         False    False   \n",
              "8070  Complex Retrieval Queries  recommendations         False    False   \n",
              "8071  Complex Retrieval Queries  recommendations         False    False   \n",
              "\n",
              "      returns_results false_schema  \n",
              "7275             True          NaN  \n",
              "7276             True          NaN  \n",
              "7277             True          NaN  \n",
              "7278             True          NaN  \n",
              "7279             True          NaN  \n",
              "...               ...          ...  \n",
              "8067             True          NaN  \n",
              "8068            False          NaN  \n",
              "8069             True          NaN  \n",
              "8070             True          NaN  \n",
              "8071             True          NaN  \n",
              "\n",
              "[762 rows x 8 columns]"
            ]
          },
          "execution_count": 15,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "import pandas as pd\n",
        "\n",
        "df = pd.read_csv('/content/text2cypher_gpt4turbo.csv')\n",
        "df = df[(df['database'] == 'recommendations') & (df['syntax_error'] == False) & (df['timeout'] == False)]\n",
        "df"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 16,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 513
        },
        "id": "Q5IQhw0K8Quq",
        "outputId": "20006fc2-f291-4931-eadc-13b3c1fde3c2"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "<ipython-input-16-ed1885fb552d>:2: SettingWithCopyWarning: \n",
            "A value is trying to be set on a copy of a slice from a DataFrame\n",
            "\n",
            "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
            "  df.rename(columns={'question': 'input','cypher':'output'}, inplace=True)\n"
          ]
        },
        {
          "data": {
            "application/vnd.google.colaboratory.intrinsic+json": {
              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 762,\n  \"fields\": [\n    {\n      \"column\": \"input\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 741,\n        \"samples\": [\n          \"List the top 3 directors by the number of movies directed.\",\n          \"Which genres have the most movies with a runtime over 120 minutes?\",\n          \"List the top 5 movies with the highest IMDb rating.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"output\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 673,\n        \"samples\": [\n          \"MATCH (m:Movie)\\nWHERE m.released < \\\"2010-01-01\\\" AND m.revenue IS NOT NULL\\nRETURN m\\nORDER BY m.revenue DESC\\nLIMIT 5\",\n          \"MATCH (d:Director)-[:DIRECTED]->(m:Movie)-[:IN_GENRE]->(g:Genre {name: 'Action'})\\nWITH d, count(m) AS moviesDirected\\nORDER BY moviesDirected DESC\\nLIMIT 5\\nRETURN d.name, moviesDirected\",\n          \"MATCH (d:Director)-[:DIRECTED]->(m:Movie)\\nWITH d, collect(DISTINCT m.languages) AS languages\\nWHERE size(languages) > 3\\nRETURN d.name, languages\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}",
              "type": "dataframe",
              "variable_name": "df"
            },
            "text/html": [
              "\n",
              "  <div id=\"df-78fbeeca-cfd1-48c2-a342-c51825921ae4\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input</th>\n",
              "      <th>output</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>What are the top 5 movies with a runtime great...</td>\n",
              "      <td>MATCH (m:Movie)\\nWHERE m.runtime &gt; 120\\nRETURN...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>List the first 3 genres with movies having an ...</td>\n",
              "      <td>MATCH (m:Movie)-[:IN_GENRE]-&gt;(g:Genre)\\nWHERE ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>List the first 5 directors who have a biograph...</td>\n",
              "      <td>MATCH (d:Director)\\nWHERE d.bio IS NOT NULL\\nR...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Which 3 movies have the most detailed plot des...</td>\n",
              "      <td>MATCH (m:Movie)\\nRETURN m.title, m.plot\\nORDER...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Show the top 5 actors who have acted in movies...</td>\n",
              "      <td>MATCH (a:Actor)-[:ACTED_IN]-&gt;(m:Movie)&lt;-[:DIRE...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>757</th>\n",
              "      <td>Which movies have been acted in by more than 1...</td>\n",
              "      <td>MATCH (a:Actor)-[:ACTED_IN]-&gt;(m:Movie)\\nWITH m...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>758</th>\n",
              "      <td>Find all movies where the director has directe...</td>\n",
              "      <td>MATCH (d:Director)-[:DIRECTED]-&gt;(m:Movie)\\nWIT...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>759</th>\n",
              "      <td>Find all movies that have a plot mentioning 'h...</td>\n",
              "      <td>MATCH (m:Movie)\\nWHERE m.plot CONTAINS 'hero'\\...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>760</th>\n",
              "      <td>Which movies have been rated the highest by us...</td>\n",
              "      <td>MATCH (u:User)-[r:RATED]-&gt;(m:Movie)\\nWITH u, c...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>761</th>\n",
              "      <td>List the top 5 oldest directors in the database.</td>\n",
              "      <td>MATCH (d:Director)\\nWHERE d.born IS NOT NULL\\n...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>762 rows × 2 columns</p>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-78fbeeca-cfd1-48c2-a342-c51825921ae4')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-78fbeeca-cfd1-48c2-a342-c51825921ae4 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-78fbeeca-cfd1-48c2-a342-c51825921ae4');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-135cd875-d695-42ff-aeaa-4dfaf70d7b56\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-135cd875-d695-42ff-aeaa-4dfaf70d7b56')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-135cd875-d695-42ff-aeaa-4dfaf70d7b56 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "text/plain": [
              "                                                 input  \\\n",
              "0    What are the top 5 movies with a runtime great...   \n",
              "1    List the first 3 genres with movies having an ...   \n",
              "2    List the first 5 directors who have a biograph...   \n",
              "3    Which 3 movies have the most detailed plot des...   \n",
              "4    Show the top 5 actors who have acted in movies...   \n",
              "..                                                 ...   \n",
              "757  Which movies have been acted in by more than 1...   \n",
              "758  Find all movies where the director has directe...   \n",
              "759  Find all movies that have a plot mentioning 'h...   \n",
              "760  Which movies have been rated the highest by us...   \n",
              "761   List the top 5 oldest directors in the database.   \n",
              "\n",
              "                                                output  \n",
              "0    MATCH (m:Movie)\\nWHERE m.runtime > 120\\nRETURN...  \n",
              "1    MATCH (m:Movie)-[:IN_GENRE]->(g:Genre)\\nWHERE ...  \n",
              "2    MATCH (d:Director)\\nWHERE d.bio IS NOT NULL\\nR...  \n",
              "3    MATCH (m:Movie)\\nRETURN m.title, m.plot\\nORDER...  \n",
              "4    MATCH (a:Actor)-[:ACTED_IN]->(m:Movie)<-[:DIRE...  \n",
              "..                                                 ...  \n",
              "757  MATCH (a:Actor)-[:ACTED_IN]->(m:Movie)\\nWITH m...  \n",
              "758  MATCH (d:Director)-[:DIRECTED]->(m:Movie)\\nWIT...  \n",
              "759  MATCH (m:Movie)\\nWHERE m.plot CONTAINS 'hero'\\...  \n",
              "760  MATCH (u:User)-[r:RATED]->(m:Movie)\\nWITH u, c...  \n",
              "761  MATCH (d:Director)\\nWHERE d.born IS NOT NULL\\n...  \n",
              "\n",
              "[762 rows x 2 columns]"
            ]
          },
          "execution_count": 16,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df = df[['question','cypher']]\n",
        "df.rename(columns={'question': 'input','cypher':'output'}, inplace=True)\n",
        "df.reset_index(drop=True, inplace=True)\n",
        "df"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 17,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 176,
          "referenced_widgets": [
            "1dce4c7d643842e1ae025bd09db7309b",
            "0496be4a562a439192fa438747dbdbd1",
            "0f9570764fed4bf68a4e1a0b0d103132",
            "ac1fd89075c64a9da8894158efed37e4",
            "e09a71f975174d57bedf9e29eeeef871",
            "a9b59440d9384c7885a343c185f4c9d6",
            "54b0a061363046ccbf5d3a324b75c8b1",
            "fce41b6ff9264839b227d87786a01c8e",
            "399cf0648af84c218d70c4798acd8750",
            "dfbdc26a88184539890f2602c2411565",
            "dfdd4dfa79a64a24a28c913398e43714"
          ]
        },
        "id": "41g0XJJk1fRC",
        "outputId": "ba73a62b-aeec-4329-d7be-5156e1d050ca"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Parameter 'function'=<function formatting_prompts_func at 0x7a5519457910> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.\n",
            "WARNING:datasets.fingerprint:Parameter 'function'=<function formatting_prompts_func at 0x7a5519457910> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.\n"
          ]
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "1dce4c7d643842e1ae025bd09db7309b",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "Map:   0%|          | 0/762 [00:00<?, ? examples/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "text/plain": [
              "Dataset({\n",
              "    features: ['input', 'output', 'text'],\n",
              "    num_rows: 762\n",
              "})"
            ]
          },
          "execution_count": 17,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "from datasets import Dataset\n",
        "dataset = Dataset.from_pandas(df)\n",
        "dataset = dataset.map(formatting_prompts_func, batched = True)\n",
        "dataset"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 18,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "IH-ZXqCh1jmx",
        "outputId": "bfcba81b-eb52-4c40-d77b-36218a46f1cb"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "{'input': 'What are the top 5 movies with a runtime greater than 120 minutes?',\n",
              " 'output': 'MATCH (m:Movie)\\nWHERE m.runtime > 120\\nRETURN m\\nORDER BY m.runtime DESC\\nLIMIT 5',\n",
              " 'text': 'Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\\n\\n### Instruction:\\nConvert text to cypher query based on this schema: Node properties:\\nMovie {posterEmbedding: LIST, url: STRING, runtime: INTEGER, revenue: INTEGER, budget: INTEGER, plotEmbedding: LIST, imdbRating: FLOAT, released: STRING, countries: LIST, languages: LIST, plot: STRING, imdbVotes: INTEGER, imdbId: STRING, year: INTEGER, poster: STRING, movieId: STRING, tmdbId: STRING, title: STRING}\\nGenre {name: STRING}\\nUser {userId: STRING, name: STRING}\\nActor {url: STRING, bornIn: STRING, bio: STRING, died: DATE, born: DATE, imdbId: STRING, name: STRING, poster: STRING, tmdbId: STRING}\\nDirector {url: STRING, bornIn: STRING, born: DATE, died: DATE, tmdbId: STRING, imdbId: STRING, name: STRING, poster: STRING, bio: STRING}\\nPerson {url: STRING, died: DATE, bornIn: STRING, born: DATE, imdbId: STRING, name: STRING, poster: STRING, tmdbId: STRING, bio: STRING}\\nRelationship properties:\\nRATED {rating: FLOAT, timestamp: INTEGER}\\nACTED_IN {role: STRING}\\nDIRECTED {role: STRING}\\nThe relationships:\\n(:Movie)-[:IN_GENRE]->(:Genre)\\n(:User)-[:RATED]->(:Movie)\\n(:Actor)-[:ACTED_IN]->(:Movie)\\n(:Actor)-[:DIRECTED]->(:Movie)\\n(:Director)-[:DIRECTED]->(:Movie)\\n(:Director)-[:ACTED_IN]->(:Movie)\\n(:Person)-[:ACTED_IN]->(:Movie)\\n(:Person)-[:DIRECTED]->(:Movie)\\n\\n### Input:\\nWhat are the top 5 movies with a runtime greater than 120 minutes?\\n\\n### Response:\\nMATCH (m:Movie)\\nWHERE m.runtime > 120\\nRETURN m\\nORDER BY m.runtime DESC\\nLIMIT 5<|end_of_text|>'}"
            ]
          },
          "execution_count": 18,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "dataset[0]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "SC9NLzC21lIi"
      },
      "source": [
        "# Train the model"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 19,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 105,
          "referenced_widgets": [
            "4bc3643ab256478796fc34ee9b2d0f72",
            "81315ff30a9b4963b881d6aa4f86ec18",
            "7ebf48b2b9ed4f7a95441804050a0740",
            "44104deec56e4f9d808497524ec17369",
            "5a80e5df479643ae8f5b86eba0feea2a",
            "aa14b97a97eb4ef299fbaf8491f61369",
            "32854c8f504045d5931c07d00028e80a",
            "93706ddfeeec4229bb83ad515ac63acc",
            "79b18ec4d1e947188ae49b85d5005a10",
            "60ea1ee21a1048238194ae255b9d906f",
            "22c29c45bf6c4c64bf5b9b130b02cdbd"
          ]
        },
        "id": "JdZwBahH1niQ",
        "outputId": "f5b12e6b-f34b-4cdb-c726-5b2016922d85"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/multiprocess/popen_fork.py:66: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock.\n",
            "  self.pid = os.fork()\n"
          ]
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "4bc3643ab256478796fc34ee9b2d0f72",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "Map (num_proc=2):   0%|          | 0/762 [00:00<?, ? examples/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "from trl import SFTTrainer\n",
        "from transformers import TrainingArguments\n",
        "\n",
        "trainer = SFTTrainer(\n",
        "    model = model,\n",
        "    tokenizer = tokenizer,\n",
        "    train_dataset = dataset,\n",
        "    dataset_text_field = \"text\",\n",
        "    max_seq_length = max_seq_length,\n",
        "    dataset_num_proc = 2,\n",
        "    packing = False, # Can make training 5x faster for short sequences.\n",
        "    args = TrainingArguments(\n",
        "        per_device_train_batch_size = 2,\n",
        "        gradient_accumulation_steps = 4,\n",
        "        warmup_steps = 5,\n",
        "        # max_steps = 60,\n",
        "        num_train_epochs=1,\n",
        "        learning_rate = 2e-4,\n",
        "        fp16 = not torch.cuda.is_bf16_supported(),\n",
        "        bf16 = torch.cuda.is_bf16_supported(),\n",
        "        logging_steps = 1,\n",
        "        optim = \"adamw_8bit\",\n",
        "        weight_decay = 0.01,\n",
        "        lr_scheduler_type = \"linear\",\n",
        "        seed = 3407,\n",
        "        output_dir = \"outputs\",\n",
        "    ),\n",
        ")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "FvDCSQkq2Cll",
        "outputId": "b5e751b5-7d7e-4a9b-fed7-24249d2bc39c"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "GPU = Tesla T4. Max memory = 14.748 GB.\n",
            "5.594 GB of memory reserved.\n"
          ]
        }
      ],
      "source": [
        "# @title Show current memory stats\n",
        "gpu_stats = torch.cuda.get_device_properties(0)\n",
        "start_gpu_memory = round(torch.cuda.max_memory_reserved() / 1024 / 1024 / 1024, 3)\n",
        "max_memory = round(gpu_stats.total_memory / 1024 / 1024 / 1024, 3)\n",
        "print(f\"GPU = {gpu_stats.name}. Max memory = {max_memory} GB.\")\n",
        "print(f\"{start_gpu_memory} GB of memory reserved.\")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 20,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "_C5yHN0l2ULP",
        "outputId": "08f11f4b-19c3-4d84-acf2-c5d0a923995f"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "==((====))==  Unsloth - 2x faster free finetuning | Num GPUs = 1\n",
            "   \\\\   /|    Num examples = 762 | Num Epochs = 1\n",
            "O^O/ \\_/ \\    Batch size per device = 2 | Gradient Accumulation steps = 4\n",
            "\\        /    Total batch size = 8 | Total steps = 95\n",
            " \"-____-\"     Number of trainable parameters = 41,943,040\n"
          ]
        },
        {
          "data": {
            "text/html": [
              "\n",
              "    <div>\n",
              "      \n",
              "      <progress value='95' max='95' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
              "      [95/95 17:27, Epoch 0/1]\n",
              "    </div>\n",
              "    <table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              " <tr style=\"text-align: left;\">\n",
              "      <th>Step</th>\n",
              "      <th>Training Loss</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <td>1</td>\n",
              "      <td>1.297000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>2</td>\n",
              "      <td>1.277300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>3</td>\n",
              "      <td>1.266100</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>4</td>\n",
              "      <td>1.160900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>5</td>\n",
              "      <td>1.019300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>6</td>\n",
              "      <td>0.840200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>7</td>\n",
              "      <td>0.677100</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>8</td>\n",
              "      <td>0.536600</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>9</td>\n",
              "      <td>0.399000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>10</td>\n",
              "      <td>0.296300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>11</td>\n",
              "      <td>0.211400</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>12</td>\n",
              "      <td>0.189500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>13</td>\n",
              "      <td>0.147500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>14</td>\n",
              "      <td>0.107500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>15</td>\n",
              "      <td>0.131800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>16</td>\n",
              "      <td>0.101200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>17</td>\n",
              "      <td>0.090000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>18</td>\n",
              "      <td>0.114000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>19</td>\n",
              "      <td>0.091200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>20</td>\n",
              "      <td>0.107000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>21</td>\n",
              "      <td>0.087300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>22</td>\n",
              "      <td>0.086500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>23</td>\n",
              "      <td>0.100200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>24</td>\n",
              "      <td>0.098500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>25</td>\n",
              "      <td>0.086800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>26</td>\n",
              "      <td>0.088500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>27</td>\n",
              "      <td>0.080500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>28</td>\n",
              "      <td>0.079500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>29</td>\n",
              "      <td>0.070800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>30</td>\n",
              "      <td>0.090000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>31</td>\n",
              "      <td>0.073100</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>32</td>\n",
              "      <td>0.063700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>33</td>\n",
              "      <td>0.072300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>34</td>\n",
              "      <td>0.068400</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>35</td>\n",
              "      <td>0.068800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>36</td>\n",
              "      <td>0.058900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>37</td>\n",
              "      <td>0.043500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>38</td>\n",
              "      <td>0.094900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>39</td>\n",
              "      <td>0.073100</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>40</td>\n",
              "      <td>0.066000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>41</td>\n",
              "      <td>0.053400</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>42</td>\n",
              "      <td>0.055000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>43</td>\n",
              "      <td>0.073000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>44</td>\n",
              "      <td>0.069700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>45</td>\n",
              "      <td>0.078000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>46</td>\n",
              "      <td>0.059700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>47</td>\n",
              "      <td>0.046800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>48</td>\n",
              "      <td>0.065100</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>49</td>\n",
              "      <td>0.053900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>50</td>\n",
              "      <td>0.059600</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>51</td>\n",
              "      <td>0.055800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>52</td>\n",
              "      <td>0.052700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>53</td>\n",
              "      <td>0.050700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>54</td>\n",
              "      <td>0.052800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>55</td>\n",
              "      <td>0.049000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>56</td>\n",
              "      <td>0.049500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>57</td>\n",
              "      <td>0.060300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>58</td>\n",
              "      <td>0.061800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>59</td>\n",
              "      <td>0.047700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>60</td>\n",
              "      <td>0.045900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>61</td>\n",
              "      <td>0.055700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>62</td>\n",
              "      <td>0.055800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>63</td>\n",
              "      <td>0.065900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>64</td>\n",
              "      <td>0.054700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>65</td>\n",
              "      <td>0.044200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>66</td>\n",
              "      <td>0.053500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>67</td>\n",
              "      <td>0.065700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>68</td>\n",
              "      <td>0.063200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>69</td>\n",
              "      <td>0.041800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>70</td>\n",
              "      <td>0.050600</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>71</td>\n",
              "      <td>0.050500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>72</td>\n",
              "      <td>0.070800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>73</td>\n",
              "      <td>0.059800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>74</td>\n",
              "      <td>0.061700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>75</td>\n",
              "      <td>0.053800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>76</td>\n",
              "      <td>0.052100</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>77</td>\n",
              "      <td>0.052300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>78</td>\n",
              "      <td>0.048800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>79</td>\n",
              "      <td>0.057800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>80</td>\n",
              "      <td>0.056600</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>81</td>\n",
              "      <td>0.064300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>82</td>\n",
              "      <td>0.083700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>83</td>\n",
              "      <td>0.064400</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>84</td>\n",
              "      <td>0.045800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>85</td>\n",
              "      <td>0.052900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>86</td>\n",
              "      <td>0.047600</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>87</td>\n",
              "      <td>0.047300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>88</td>\n",
              "      <td>0.064000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>89</td>\n",
              "      <td>0.059700</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>90</td>\n",
              "      <td>0.049500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>91</td>\n",
              "      <td>0.057200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>92</td>\n",
              "      <td>0.057500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>93</td>\n",
              "      <td>0.049600</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>94</td>\n",
              "      <td>0.051500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <td>95</td>\n",
              "      <td>0.089200</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table><p>"
            ],
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "trainer_stats = trainer.train()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 25,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "hcHYz_6N2alm",
        "outputId": "1577ea83-5c29-4ab2-ab1e-a1835cb8a330"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "1065.0767 seconds used for training.\n",
            "17.75 minutes used for training.\n",
            "Peak reserved memory = 7.344 GB.\n",
            "Peak reserved memory for training = 0.0 GB.\n",
            "Peak reserved memory % of max memory = 49.797 %.\n",
            "Peak reserved memory for training % of max memory = 0.0 %.\n"
          ]
        }
      ],
      "source": [
        "#@title Show final memory and time stats\n",
        "used_memory = round(torch.cuda.max_memory_reserved() / 1024 / 1024 / 1024, 3)\n",
        "used_memory_for_lora = round(used_memory - start_gpu_memory, 3)\n",
        "used_percentage = round(used_memory         /max_memory*100, 3)\n",
        "lora_percentage = round(used_memory_for_lora/max_memory*100, 3)\n",
        "print(f\"{trainer_stats.metrics['train_runtime']} seconds used for training.\")\n",
        "print(f\"{round(trainer_stats.metrics['train_runtime']/60, 2)} minutes used for training.\")\n",
        "print(f\"Peak reserved memory = {used_memory} GB.\")\n",
        "print(f\"Peak reserved memory for training = {used_memory_for_lora} GB.\")\n",
        "print(f\"Peak reserved memory % of max memory = {used_percentage} %.\")\n",
        "print(f\"Peak reserved memory for training % of max memory = {lora_percentage} %.\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "xksi4ATB2l6I"
      },
      "source": [
        "# Inference"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 26,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "MSxKi7cG2lRd",
        "outputId": "cf2fb6f1-0521-4516-cd9e-8652c0c700ec"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "<|begin_of_text|>Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n",
            "\n",
            "### Instruction:\n",
            "Convert text to cypher query based on this schema: Node properties:\n",
            "Movie {posterEmbedding: LIST, url: STRING, runtime: INTEGER, revenue: INTEGER, budget: INTEGER, plotEmbedding: LIST, imdbRating: FLOAT, released: STRING, countries: LIST, languages: LIST, plot: STRING, imdbVotes: INTEGER, imdbId: STRING, year: INTEGER, poster: STRING, movieId: STRING, tmdbId: STRING, title: STRING}\n",
            "Genre {name: STRING}\n",
            "User {userId: STRING, name: STRING}\n",
            "Actor {url: STRING, bornIn: STRING, bio: STRING, died: DATE, born: DATE, imdbId: STRING, name: STRING, poster: STRING, tmdbId: STRING}\n",
            "Director {url: STRING, bornIn: STRING, born: DATE, died: DATE, tmdbId: STRING, imdbId: STRING, name: STRING, poster: STRING, bio: STRING}\n",
            "Person {url: STRING, died: DATE, bornIn: STRING, born: DATE, imdbId: STRING, name: STRING, poster: STRING, tmdbId: STRING, bio: STRING}\n",
            "Relationship properties:\n",
            "RATED {rating: FLOAT, timestamp: INTEGER}\n",
            "ACTED_IN {role: STRING}\n",
            "DIRECTED {role: STRING}\n",
            "The relationships:\n",
            "(:Movie)-[:IN_GENRE]->(:Genre)\n",
            "(:User)-[:RATED]->(:Movie)\n",
            "(:Actor)-[:ACTED_IN]->(:Movie)\n",
            "(:Actor)-[:DIRECTED]->(:Movie)\n",
            "(:Director)-[:DIRECTED]->(:Movie)\n",
            "(:Director)-[:ACTED_IN]->(:Movie)\n",
            "(:Person)-[:ACTED_IN]->(:Movie)\n",
            "(:Person)-[:DIRECTED]->(:Movie)\n",
            "\n",
            "### Input:\n",
            "Who is the oldest director?\n",
            "\n",
            "### Response:\n",
            "MATCH (d:Director)\n",
            "WHERE d.born IS NOT NULL\n",
            "RETURN d.name, d.born\n",
            "ORDER BY d.born ASC\n",
            "LIMIT 1<|end_of_text|>\n"
          ]
        }
      ],
      "source": [
        "FastLanguageModel.for_inference(model) # Enable native 2x faster inference\n",
        "inputs = tokenizer(\n",
        "[\n",
        "    prompt.format(\n",
        "        f\"Convert text to cypher query based on this schema: {graph.schema}\", # instruction\n",
        "        \"Who is the oldest director?\", # input\n",
        "        \"\", # output - leave this blank for generation!\n",
        "    )\n",
        "], return_tensors = \"pt\").to(\"cuda\")\n",
        "\n",
        "from transformers import TextStreamer\n",
        "text_streamer = TextStreamer(tokenizer)\n",
        "_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ARl0WyjQ2y80"
      },
      "source": [
        "# Save the Finetuned"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "1c8-oyVW3G9n"
      },
      "source": [
        "Local Saving"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "Ic6oABDT210b"
      },
      "outputs": [],
      "source": [
        "# model.save_pretrained(\"lora_model\") # Local saving\n",
        "# tokenizer.save_pretrained(\"lora_model\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "BqaBRrO_3LX-"
      },
      "source": [
        "Online Saving to HuggingFace"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 27,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 155,
          "referenced_widgets": [
            "611f67423a5647368f717e231cf6f822",
            "657e6b78393747b7913eb55c99e79cea",
            "cc1b534956af44fb9419cfbee84d488d",
            "b88c6b9a6735472e82b1bcefef6ec92a",
            "7f173a4ef13a4fa7b3130dc72dc019c5",
            "6230dc6fdc644b38a5e4e0b40760e0af",
            "4b61a12378b74b4499d4c951c2f9e1aa",
            "5a3767d2d54643bc9aa9598a593f52f5",
            "6b55bc322cce4cef8acadc736610999c",
            "9cafb4814d4b4f0fb1058800aaa198f5",
            "4e223c5547f143abb5eeaa396e8f2c2f",
            "aa906bdc597f4bbc8cf69f8fdec529b3",
            "63a2c6a69428403ca222e8170ca7404e",
            "ed39bbed66c04d488f03e258bd3b5eed",
            "9528079d04ea44cc83e63c087c796c71",
            "aeb71514fab841c193f52b016f051a86",
            "efc07c817a9e4e39b6ae37e40cdfe8d5",
            "e079a4aa3f3248d7916ff4735941e580",
            "b23abc1da65d406b81fe6874e59f98c4",
            "cb2b23067e1545bba026a03e8c3f6bbc",
            "ec221012343f4b2d9cdd30d4ed46ea57",
            "297881d35c1d4ce5b1348d4cc1f307fb"
          ]
        },
        "id": "SMZB_OeJ3OSR",
        "outputId": "aa3b172b-4a31-4cb4-c772-43cc72b6db8d"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "611f67423a5647368f717e231cf6f822",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "README.md:   0%|          | 0.00/580 [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n",
            "  warnings.warn(\n"
          ]
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "aa906bdc597f4bbc8cf69f8fdec529b3",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "adapter_model.safetensors:   0%|          | 0.00/168M [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Saved model to https://huggingface.co/projectwilsen/llama3_text2cypher_recommendations\n"
          ]
        }
      ],
      "source": [
        "# should have write access\n",
        "\n",
        "model.push_to_hub(\"projectwilsen/llama3_text2cypher_recommendations\", token = hf_api)\n",
        "tokenizer.push_to_hub(\"projectwilsen/llama3_text2cypher_recommendations\", token = hf_api)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "trVA9TSJ4HCe"
      },
      "source": [
        "# Load Finetuned Model from HuggingFace"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 28,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 244,
          "referenced_widgets": [
            "49b8a2849c1e4d378127e6b837a3cfdb",
            "cd1cb0d06d27410e9068f4d7fcffc854",
            "45a747af1fc4456d8fda7e590bfb310b",
            "ea1c0edb8e7444d896c438da2bd02ab8",
            "c9343ee6fc7745f7ad0b94b108184e4e",
            "13f8b4a204d941c6bfcaa92c25780c5a",
            "4ce316cfef3b4cd8bddeda405d6a0438",
            "bb0b496ee9954d40ade599b0640a870d",
            "26846b5ff2b3461983fa51a018cf58db",
            "5e25bd50b68c46599f2dc41eb2e2a819",
            "ee201940617e446ca2603b0c2498d0ff",
            "8092f2c61cda4a92bacde140c912856f",
            "6a6ba46091ad46b6bafc6648806d6840",
            "6929d475149748c18c5b7d89ae760731",
            "3d1a3caded7b481680508f074140da4d",
            "d3bf48bee72b43a18633a1a0b88e35d7",
            "d8ad941e4a2f465b9a56acb8bcaf2947",
            "ec7e01cf648548b280dad53cdda55a59",
            "81555692a53643d894924a00b98c2ae7",
            "418442c4a6de48c7bf9047e10dc37981",
            "645ca6826c8f4a489e1eda96ce8799f5",
            "4d21240d967b4f6d8185ef84bd5c9bd3"
          ]
        },
        "id": "na8IRRD83r_L",
        "outputId": "6b705b99-98c7-475e-eb56-c07e76c49dbf"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "49b8a2849c1e4d378127e6b837a3cfdb",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "adapter_config.json:   0%|          | 0.00/732 [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Unused kwargs: ['_load_in_4bit', '_load_in_8bit', 'quant_method']. These kwargs are not used in <class 'transformers.utils.quantization_config.BitsAndBytesConfig'>.\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "==((====))==  Unsloth: Fast Llama patching release 2024.4\n",
            "   \\\\   /|    GPU: Tesla T4. Max memory: 14.748 GB. Platform = Linux.\n",
            "O^O/ \\_/ \\    Pytorch: 2.2.1+cu121. CUDA = 7.5. CUDA Toolkit = 12.1.\n",
            "\\        /    Bfloat16 = FALSE. Xformers = 0.0.25.post1. FA = False.\n",
            " \"-____-\"     Free Apache license: http://github.com/unslothai/unsloth\n"
          ]
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n",
            "Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"
          ]
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "8092f2c61cda4a92bacde140c912856f",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "adapter_model.safetensors:   0%|          | 0.00/168M [00:00<?, ?B/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "from unsloth import FastLanguageModel\n",
        "\n",
        "max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!\n",
        "dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+\n",
        "load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.\n",
        "\n",
        "model, tokenizer = FastLanguageModel.from_pretrained(\n",
        "    model_name = \"projectwilsen/llama3_text2cypher_recommendations_epoch2\", # YOUR MODEL YOU USED FOR TRAINING\n",
        "    max_seq_length = max_seq_length,\n",
        "    dtype = dtype,\n",
        "    load_in_4bit = load_in_4bit,\n",
        ")\n",
        "FastLanguageModel.for_inference(model) # Enable native 2x faster inference"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 31,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "WAqckP8s4NQ4",
        "outputId": "172f6311-5ffa-48f4-fb0c-570a11af8df3"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "MATCH (d:Director)\n",
            "WHERE d.born IS NOT NULL\n",
            "RETURN d.name, d.born\n",
            "ORDER BY d.born ASC\n",
            "LIMIT 1\n"
          ]
        }
      ],
      "source": [
        "inputs = tokenizer(\n",
        "[\n",
        "    prompt.format(\n",
        "        f\"Convert text to cypher query based on this schema: {graph.schema}\", # instruction\n",
        "        \"Who is the oldest director?\", # input\n",
        "        \"\", # output - leave this blank for generation!\n",
        "    )\n",
        "], return_tensors = \"pt\").to(\"cuda\")\n",
        "\n",
        "outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)\n",
        "result = tokenizer.batch_decode(outputs)\n",
        "response = result[0].split(\"### Response:\")[1].split(\"###\")[0].strip().replace(\"<|end_of_text|>\", \"\")\n",
        "print(response)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Urmm1ZaC4dUB"
      },
      "source": [
        "# Evaluating"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "weGmnnrd4rJQ"
      },
      "source": [
        "Unsloth has not integrated in Langchain, so need little adjustment"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 32,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 36
        },
        "id": "zVqg1eZ74j6_",
        "outputId": "8cef9ca7-5b76-44a8-fd42-f887b8bf5d1d"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "string"
            },
            "text/plain": [
              "'Georges Méliès'"
            ]
          },
          "execution_count": 32,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "from langchain.chains import LLMChain\n",
        "from langchain_groq import ChatGroq\n",
        "from langchain_core.output_parsers import StrOutputParser\n",
        "from langchain_core.prompts import ChatPromptTemplate\n",
        "from google.colab import userdata\n",
        "groq_api_key = userdata.get('GROQ_API')\n",
        "\n",
        "CYPHER_QA_TEMPLATE = \"\"\"You convert context to a final answer. Understand the question, the context, then generate result.\n",
        "Here is an example:\n",
        "\n",
        "Question: Who is the director of Harry Potter 1 and 8?\n",
        "Context: [{{d.name: Chris Columbus, d.born: 10 September 1958}},{{d.name: David Yates, d.born: 8 October 1963}}]\n",
        "Helpful Answer: Chris Columbus and David Yates is the director of Harry Potter\n",
        "\n",
        "Follow this example when generating answers.\n",
        "Answer in short, don't hallucinate!\n",
        "Question: {question}\n",
        "Information: {context}\n",
        "Helpful Answer:\n",
        "\"\"\"\n",
        "\n",
        "qa_prompt = ChatPromptTemplate.from_template(CYPHER_QA_TEMPLATE)\n",
        "output_parser = StrOutputParser()\n",
        "llm = ChatGroq(temperature=0, model_name=\"llama3-8b-8192\", groq_api_key = groq_api_key)\n",
        "chain = qa_prompt | llm | output_parser\n",
        "\n",
        "context = graph.query(response)\n",
        "question = 'Who is the oldest director?'\n",
        "\n",
        "chain.invoke({\"context\":context , \"question\":question})"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "TxZj5_P25Imx",
        "outputId": "509cd847-eb46-4c1b-b775-f99d0d756e7b"
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "\n",
            " Who is the oldest director?\n",
            "MATCH (d:Director)\n",
            "WHERE d.born IS NOT NULL\n",
            "RETURN d\n",
            "ORDER BY d.born\n",
            "LIMIT 1\n",
            "context:  [{'d': {'bornIn': 'Paris, France', 'tmdbId': '11523', 'imdbId': '0617588', 'born': neo4j.time.Date(1861, 12, 8), 'name': 'Georges Méliès', 'bio': 'Georges Méliès, full name Marie-Georges-Jean Méliès, was a French illusionist and filmmaker famous for leading many technical and narrative developments in the earliest days of cinema.  One of the first filmmakers to use multiple exposures, time-lapse photography, tracking shots, dissolves, and hand-painted color in his work, Méliès pioneered effects that would define cinematic special effects for decades to come...', 'died': neo4j.time.Date(1938, 1, 21), 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/ba3Kfc01Dbigt41lyuFoZR7gmv1.jpg', 'url': 'https://themoviedb.org/person/11523'}}]\n"
          ]
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Georges Méliès is the oldest director.\n",
            "\n",
            " Find all directors who have directed a movie in Spanish language.\n",
            "MATCH (d:Director)-[:DIRECTED]->(m:Movie)\n",
            "WHERE 'Spanish' IN m.languages\n",
            "RETURN d.name, collect(m.title) AS movies\n",
            "context:  [{'d.name': 'Alejandro Jodorowsky', 'movies': ['Topo, El', 'Fando and Lis (Fando y Lis)']}, {'d.name': 'Alfonso Arau', 'movies': ['Like Water for Chocolate (Como agua para chocolate)']}, {'d.name': 'Abel Ferrara', 'movies': ['King of New York']}, {'d.name': 'Nacho Vigalondo', 'movies': ['Timecrimes (Cronocrímenes, Los)']}, {'d.name': 'Luis Buñuel', 'movies': ['Tristana', 'Nazarin (Nazarín)', 'Simon of the Desert (Simón del desierto)', 'Viridiana', 'Exterminating Angel, The (Ángel exterminador, El)']}, {'d.name': 'Mikhail Kalatozov', 'movies': ['I Am Cuba (Soy Cuba/Ya Kuba)']}, {'d.name': 'Les Blank', 'movies': ['Burden of Dreams']}, {'d.name': 'Juan Piquer Simón', 'movies': ['Pieces (Mil gritos tiene la noche) (One Thousand Cries Has the Night)']}, {'d.name': 'Pedro Almodóvar', 'movies': ['Broken Embraces (Los abrazos rotos)', 'Skin I Live In, The (La piel que habito)', 'Volver', 'All About My Mother (Todo sobre mi madre)', 'Bad Education (La mala educación)', 'Talk to Her (Hable con Ella)', 'Live Flesh (Carne trémula)', 'Kika', 'Flower of My Secret, The (La flor de mi secreto)', 'Law of Desire (Ley del deseo, La)', 'Bullfighter, The (Matador)', 'Tie Me Up! Tie Me Down! (¡Átame!)', 'Women on the Verge of a Nervous Breakdown (Mujeres al borde de un ataque de nervios)', 'Dark Habits (Entre tinieblas)', 'Labyrinth of Passion (Laberinto de Pasiones)']}, {'d.name': 'Gregory Nava', 'movies': ['Norte, El']}, {'d.name': 'Luis Puenzo', 'movies': ['Official Story, The (La historia oficial)']}, {'d.name': 'Barbet Schroeder', 'movies': ['Our Lady of the Assassins (Virgen de los sicarios, La)']}, {'d.name': 'Martin Campbell', 'movies': ['Legend of Zorro, The']}, {'d.name': 'Steven Soderbergh', 'movies': ['Che: Part One', 'Che: Part Two']}, {'d.name': 'Luis Mandoki', 'movies': ['Innocent Voices (Voces inocentes)']}, {'d.name': 'Fernando Trueba', 'movies': ['Belle époque']}, {'d.name': 'Guillermo del Toro', 'movies': [\"Pan's Labyrinth (Laberinto del fauno, El)\", \"Devil's Backbone, The (Espinazo del diablo, El)\", 'Cronos']}, {'d.name': 'Fernando E. Solanas', 'movies': ['Journey, The (El viaje)']}, {'d.name': 'Tomás Gutiérrez Alea', 'movies': ['Strawberry and Chocolate (Fresa y chocolate)', 'Guantanamera']}, {'d.name': 'Jorge Fons', 'movies': ['Callejón de los milagros, El']}, {'d.name': 'Álex de la Iglesia', 'movies': ['Last Circus, The (Balada triste de trompeta) (Sad Trumpet Ballad, A)', 'Witching and Bitching (Brujas de Zugarramurdi, Las)', 'Day of the Beast, The (Día de la Bestia, El)']}, {'d.name': 'Alfonso Cuarón', 'movies': ['And Your Mother Too (Y tu mamá también)']}, {'d.name': 'Alejandro Amenábar', 'movies': ['Sea Inside, The (Mar adentro)', 'Thesis (Tesis)', 'Open Your Eyes (Abre los ojos)']}, {'d.name': 'Juan José Campanella', 'movies': ['Secret in Their Eyes, The (El secreto de sus ojos)', 'Luna de Avellaneda', 'Son of the Bride (Hijo de la novia, El)']}, {'d.name': 'Julio Medem', 'movies': ['Sex and Lucia (Lucía y el sexo)', 'Lovers of the Arctic Circle, The (Los Amantes del Círculo Polar)']}, {'d.name': 'Walter Salles', 'movies': ['Motorcycle Diaries, The (Diarios de motocicleta)']}, {'d.name': 'José Luis Cuerda', 'movies': ['Butterfly (La lengua de las mariposas)']}, {'d.name': 'Juan Carlos Fresnadillo', 'movies': ['Intact (Intacto)']}, {'d.name': 'Fabián Bielinsky', 'movies': ['Nine Queens (Nueve reinas)']}, {'d.name': 'Juan Pablo Rebella', 'movies': ['25 Watts']}, {'d.name': 'Agustín Díaz Yanes', 'movies': [\"Don't Tempt Me (Sin noticias de Dios)\"]}, {'d.name': 'Alejandro Agresti', 'movies': ['Valentin (Valentín)']}, {'d.name': 'Fernando León de Aranoa', 'movies': ['Mondays in the Sun (Lunes al sol, Los)']}, {'d.name': ' Alejandro González Iñárritu', 'movies': ['Biutiful', \"Amores Perros (Love's a Bitch)\"]}, {'d.name': 'Dunia Ayaso', 'movies': ['Chill Out! (Descongélate!)']}, {'d.name': ' Félix Sabroso', 'movies': ['Chill Out! (Descongélate!)']}, {'d.name': 'Sebastián Cordero', 'movies': ['Chronicles (Crónicas)']}, {'d.name': 'Joshua Marston', 'movies': ['Maria Full of Grace (Maria, Llena eres de gracia)']}, {'d.name': 'Daniel Sánchez Arévalo', 'movies': ['DarkBlueAlmostBlack (Azuloscurocasinegro)']}, {'d.name': 'Damián Szifrón', 'movies': ['On Probation (Tiempo de Valientes)', 'Wild Tales']}, {'d.name': 'J.A. Bayona', 'movies': ['Orphanage, The (Orfanato, El)']}, {'d.name': 'Patricia Riggen', 'movies': ['Under the Same Moon (Misma luna, La)']}, {'d.name': 'Isidro Ortiz', 'movies': ['Shiver (Eskalofrío)']}, {'d.name': 'Luis Piedrahita', 'movies': [\"Fermat's Room (La habitación de Fermat)\"]}, {'d.name': ' Rodrigo Sopeña', 'movies': [\"Fermat's Room (La habitación de Fermat)\"]}, {'d.name': 'Jaume Balagueró', 'movies': ['[REC]']}, {'d.name': 'Christian Molina', 'movies': ['Diary of a Nymphomaniac (Diario de una Ninfómana)']}, {'d.name': 'Cary Joji Fukunaga', 'movies': ['Sin Nombre']}, {'d.name': 'Gustavo Taretto', 'movies': ['Sidewalls (Medianeras)']}, {'d.name': 'Pablo Trapero', 'movies': ['Carancho']}, {'d.name': 'Sebastián Borensztein', 'movies': ['Chinese Take-Out (Chinese Take-Away) (Un cuento chino)']}, {'d.name': 'Marcelo Piñeyro', 'movies': ['Ismael']}, {'d.name': 'Pablo Berger', 'movies': ['Snow White (Blancanieves)']}, {'d.name': 'Andrés Wood', 'movies': ['Violeta Went to Heaven (Violeta se fue a los cielos)']}, {'d.name': 'Edison Cájas', 'movies': ['El vals de los inútiles']}, {'d.name': 'Andreas Dalsgaard', 'movies': ['Life Is Sacred']}, {'d.name': ' Viviana Gómez Echeverry', 'movies': ['Life Is Sacred']}, {'d.name': 'Robert Rodriguez', 'movies': ['Mariachi, El']}, {'d.name': 'Lucía Puenzo', 'movies': ['XXY']}, {'d.name': 'Juan Carlos Tabío', 'movies': ['Strawberry and Chocolate (Fresa y chocolate)', 'Guantanamera']}, {'d.name': 'Larry Clark', 'movies': ['Wassup Rockers']}, {'d.name': 'Carlos Saura', 'movies': ['Cria Cuervos', 'Tango', 'Goya in Bordeaux (Goya en Burdeos)', 'Carmen']}, {'d.name': 'Alex Rivera', 'movies': ['Sleep Dealer']}, {'d.name': 'Marco Berger', 'movies': ['Absent (Ausente)', 'Plan B']}, {'d.name': 'Bigas Luna', 'movies': ['Tale of Ham and Passion, A (Jamón, Jamón)']}, {'d.name': 'Eliseo Subiela', 'movies': ['Man Facing Southeast']}, {'d.name': 'Daniel Burman', 'movies': ['Lost Embrace (Abrazo partido, El)']}, {'d.name': 'Carlos Carrera', 'movies': ['Crime of Father Amaro, The (Crimen del padre Amaro, El)']}, {'d.name': 'Pablo Stoll', 'movies': ['25 Watts']}, {'d.name': 'Fernando Barreda Luna', 'movies': ['Atrocious']}, {'d.name': 'Matt Piedmont', 'movies': ['Casa de mi Padre']}, {'d.name': 'Paco Plaza', 'movies': ['[REC]']}]\n"
          ]
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Here is the answer:\n",
            "\n",
            "The directors who have directed a movie in Spanish language are:\n",
            "\n",
            "* Alejandro Jodorowsky\n",
            "* Alfonso Arau\n",
            "* Abel Ferrara\n",
            "* Nacho Vigalondo\n",
            "* Luis Buñuel\n",
            "* Mikhail Kalatozov\n",
            "* Les Blank\n",
            "* Juan Piquer Simón\n",
            "* Pedro Almodóvar\n",
            "* Gregory Nava\n",
            "* Luis Puenzo\n",
            "* Barbet Schroeder\n",
            "* Martin Campbell\n",
            "* Steven Soderbergh\n",
            "* Luis Mandoki\n",
            "* Fernando Trueba\n",
            "* Guillermo del Toro\n",
            "* Fernando E. Solanas\n",
            "* Tomás Gutiérrez Alea\n",
            "* Jorge Fons\n",
            "* Álex de la Iglesia\n",
            "* Alfonso Cuarón\n",
            "* Alejandro Amenábar\n",
            "* Juan José Campanella\n",
            "* Julio Medem\n",
            "* Walter Salles\n",
            "* José Luis Cuerda\n",
            "* Juan Carlos Fresnadillo\n",
            "* Fabián Bielinsky\n",
            "* Juan Pablo Rebella\n",
            "* Agustín Díaz Yanes\n",
            "* Alejandro Agresti\n",
            "* Fernando León de Aranoa\n",
            "* Alejandro González Iñárritu\n",
            "* Dunia Ayaso\n",
            "* Félix Sabroso\n",
            "* Sebastián Cordero\n",
            "* Joshua Marston\n",
            "* Daniel Sánchez Arévalo\n",
            "* Damián Szifrón\n",
            "* J.A. Bayona\n",
            "* Patricia Riggen\n",
            "* Isidro Ortiz\n",
            "* Luis Piedrahita\n",
            "* Rodrigo Sopeña\n",
            "* Jaume Balagueró\n",
            "* Christian Molina\n",
            "* Cary Joji Fukunaga\n",
            "* Gustavo Taretto\n",
            "* Pablo Trapero\n",
            "* Sebastián Borensztein\n",
            "* Marcelo Piñeyro\n",
            "* Pablo Berger\n",
            "* Andrés Wood\n",
            "* Edison Cájas\n",
            "* Andreas Dalsgaard\n",
            "* Viviana Gómez Echeverry\n",
            "* Robert Rodriguez\n",
            "* Lucía Puenzo\n",
            "* Juan Carlos Tabío\n",
            "* Larry Clark\n",
            "* Carlos Saura\n",
            "* Alex Rivera\n",
            "* Marco Berger\n",
            "* Bigas Luna\n",
            "* Eliseo Subiela\n",
            "* Daniel Burman\n",
            "* Carlos Carrera\n",
            "* Pablo Stoll\n",
            "* Fernando Barreda Luna\n",
            "* Matt Piedmont\n",
            "* Paco Plaza\n",
            "\n",
            " Give me 5 movies where a director has also acted?\n",
            "MATCH (d:Director)-[:ACTED_IN]->(m:Movie)\n",
            "WITH d, m LIMIT 5\n",
            "MATCH (d)-[:DIRECTED]->(m2:Movie)\n",
            "RETURN m, m2\n",
            "context:  [{'m': {'languages': ['English'], 'year': 1919, 'imdbId': '0009932', 'runtime': 12, 'imdbRating': 6.1, 'movieId': '72626', 'countries': ['USA'], 'imdbVotes': 503, 'title': 'Billy Blazes, Esq.', 'url': 'https://themoviedb.org/movie/53516', 'tmdbId': '53516', 'plot': 'Billy Blazes confronts Crooked Charley, who has been ruling the town of Peaceful Vale through fear and violence.', 'released': '1919-07-06'}, 'm2': {'languages': ['English'], 'year': 1927, 'imdbId': '0018051', 'runtime': 82, 'imdbRating': 7.6, 'movieId': '8423', 'countries': ['USA'], 'imdbVotes': 2652, 'title': 'Kid Brother, The', 'url': 'https://themoviedb.org/movie/16661', 'tmdbId': '16661', 'plot': \"The most important family in Hickoryville is (naturally enough) the Hickorys, with sheriff Jim and his tough manly sons Leo and Olin. The timid youngest son, Harold, doesn't have the ...\", 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/wxh7Iq6Ng0tNjHbNLviNROyhL3M.jpg', 'released': '1927-01-17'}}, {'m': {'languages': ['English'], 'year': 1925, 'imdbId': '0015841', 'runtime': 76, 'imdbRating': 7.6, 'movieId': '25752', 'countries': ['USA'], 'imdbVotes': 3517, 'title': 'Freshman, The', 'url': 'https://themoviedb.org/movie/42359', 'tmdbId': '42359', 'plot': 'Nerdy college student will do anything to become popular on campus.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/yJjyEOHp1dpspruvcY4jL4gydoL.jpg', 'released': '1925-09-20'}, 'm2': {'languages': ['English'], 'year': 1927, 'imdbId': '0018051', 'runtime': 82, 'imdbRating': 7.6, 'movieId': '8423', 'countries': ['USA'], 'imdbVotes': 2652, 'title': 'Kid Brother, The', 'url': 'https://themoviedb.org/movie/16661', 'tmdbId': '16661', 'plot': \"The most important family in Hickoryville is (naturally enough) the Hickorys, with sheriff Jim and his tough manly sons Leo and Olin. The timid youngest son, Harold, doesn't have the ...\", 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/wxh7Iq6Ng0tNjHbNLviNROyhL3M.jpg', 'released': '1927-01-17'}}, {'m': {'languages': ['English'], 'year': 1923, 'imdbId': '0014429', 'runtime': 70, 'imdbRating': 8.3, 'movieId': '8235', 'countries': ['USA'], 'imdbVotes': 12476, 'title': 'Safety Last!', 'url': 'https://themoviedb.org/movie/22596', 'revenue': 623, 'tmdbId': '22596', 'plot': 'When a store clerk organizes a publicity stunt, in which a friend climbs the outside of a tall building, circumstances force him to make the perilous climb himself.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/jWoeNjQPtRZJbS0LRPesY9uizgS.jpg', 'released': '1923-04-01'}, 'm2': {'languages': ['English'], 'year': 1927, 'imdbId': '0018051', 'runtime': 82, 'imdbRating': 7.6, 'movieId': '8423', 'countries': ['USA'], 'imdbVotes': 2652, 'title': 'Kid Brother, The', 'url': 'https://themoviedb.org/movie/16661', 'tmdbId': '16661', 'plot': \"The most important family in Hickoryville is (naturally enough) the Hickorys, with sheriff Jim and his tough manly sons Leo and Olin. The timid youngest son, Harold, doesn't have the ...\", 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/wxh7Iq6Ng0tNjHbNLviNROyhL3M.jpg', 'released': '1927-01-17'}}, {'m': {'languages': ['English'], 'year': 1927, 'imdbId': '0018051', 'runtime': 82, 'imdbRating': 7.6, 'movieId': '8423', 'countries': ['USA'], 'imdbVotes': 2652, 'title': 'Kid Brother, The', 'url': 'https://themoviedb.org/movie/16661', 'tmdbId': '16661', 'plot': \"The most important family in Hickoryville is (naturally enough) the Hickorys, with sheriff Jim and his tough manly sons Leo and Olin. The timid youngest son, Harold, doesn't have the ...\", 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/wxh7Iq6Ng0tNjHbNLviNROyhL3M.jpg', 'released': '1927-01-17'}, 'm2': {'languages': ['English'], 'year': 1927, 'imdbId': '0018051', 'runtime': 82, 'imdbRating': 7.6, 'movieId': '8423', 'countries': ['USA'], 'imdbVotes': 2652, 'title': 'Kid Brother, The', 'url': 'https://themoviedb.org/movie/16661', 'tmdbId': '16661', 'plot': \"The most important family in Hickoryville is (naturally enough) the Hickorys, with sheriff Jim and his tough manly sons Leo and Olin. The timid youngest son, Harold, doesn't have the ...\", 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/wxh7Iq6Ng0tNjHbNLviNROyhL3M.jpg', 'released': '1927-01-17'}}, {'m': {'year': 1920, 'imdbId': '0011237', 'runtime': 91, 'imdbRating': 7.2, 'movieId': '25737', 'countries': ['Germany'], 'imdbVotes': 4655, 'title': 'Golem, The (Golem, wie er in die Welt kam, Der)', 'url': 'https://themoviedb.org/movie/2972', 'tmdbId': '2972', 'plot': 'In 16th-century Prague, a rabbi creates a giant creature from clay, called the Golem, and using sorcery, brings the creature to life in order to protect the Jews of Prague from persecution.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/PWKZx0gLB7EEMQUmWbvFk3yB3t.jpg', 'released': '1921-06-19'}, 'm2': {'year': 1920, 'imdbId': '0011237', 'runtime': 91, 'imdbRating': 7.2, 'movieId': '25737', 'countries': ['Germany'], 'imdbVotes': 4655, 'title': 'Golem, The (Golem, wie er in die Welt kam, Der)', 'url': 'https://themoviedb.org/movie/2972', 'tmdbId': '2972', 'plot': 'In 16th-century Prague, a rabbi creates a giant creature from clay, called the Golem, and using sorcery, brings the creature to life in order to protect the Jews of Prague from persecution.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/PWKZx0gLB7EEMQUmWbvFk3yB3t.jpg', 'released': '1921-06-19'}}]\n"
          ]
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Based on the provided information, here are 5 movies where a director has also acted:\n",
            "\n",
            "1. **Safety Last! (1923)** - Harold Lloyd, the director, also acted in the film.\n",
            "2. **The Kid Brother (1927)** - Harold Lloyd, the director, also acted in the film.\n",
            "3. **The Golem (1920)** - Paul Wegener, the director, also acted in the film.\n",
            "4. **The Freshman (1925)** - Bob Kortman, the director, also acted in the film.\n",
            "5. **Billy Blazes, Esq. (1919)** - unknown director, but the film features a director-actor, possibly the director of the film.\n",
            "\n",
            "Please note that the information provided does not include detailed information about the directors' acting roles in the films.\n",
            "\n",
            " List all movies with an IMDb rating greater than 5 that have been directed by a director born in China.\n",
            "MATCH (d:Director {bornIn: 'China'})-[:DIRECTED]->(m:Movie)\n",
            "WHERE m.imdbRating > 5\n",
            "RETURN m\n",
            "context:  [{'m': {'languages': ['Cantonese', ' Mandarin'], 'year': 1991, 'imdbId': '0102293', 'runtime': 91, 'imdbRating': 7.1, 'movieId': '26736', 'countries': ['Hong Kong', ' Japan'], 'imdbVotes': 9590, 'title': 'Riki-Oh: The Story of Ricky (Lik Wong)', 'url': 'https://themoviedb.org/movie/17467', 'tmdbId': '17467', 'plot': 'A young man with superhuman strength is incarcerated at a prison run by corrupt officials and seeks to use his martial arts to clean up the system.', 'poster': 'https://image.tmdb.org/t/p/w440_and_h660_face/q6O9Y3tQdc3uvlIbY3JtKSdoT8F.jpg', 'released': '1991-10-05'}}]\n",
            "Based on the provided information, the movie \"Riki-Oh: The Story of Ricky (Lik Wong)\" has an IMDb rating of 7.1, which is greater than 5. The director of this movie is not specified in the provided information. However, we can infer that the director is likely to be a Chinese-born director since the movie is a Hong Kong-Japanese co-production.\n",
            "\n",
            "Therefore, the answer is:\n",
            "\n",
            "* Riki-Oh: The Story of Ricky (Lik Wong)\n"
          ]
        }
      ],
      "source": [
        "questions = [\"Who is the oldest director?\",\n",
        "             \"Find all directors who have directed a movie in Spanish language.\",\n",
        "             \"Give me 5 movies where a director has also acted?\",\n",
        "             \"List all movies with an IMDb rating greater than 5 that have been directed by a director born in China.\"\n",
        "             ]\n",
        "\n",
        "def generate_cypher_query(question):\n",
        "  inputs = tokenizer(\n",
        "  [\n",
        "      prompt.format(\n",
        "          f\"Convert text to cypher query based on this schema: {graph.schema}\", # instruction\n",
        "          question, # input\n",
        "          \"\", # output - leave this blank for generation!\n",
        "      )\n",
        "  ], return_tensors = \"pt\").to(\"cuda\")\n",
        "\n",
        "  outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)\n",
        "  result = tokenizer.batch_decode(outputs)\n",
        "  cypher_query = result[0].split(\"### Response:\")[1].split(\"###\")[0].strip().replace(\"<|end_of_text|>\", \"\")\n",
        "  return cypher_query\n",
        "\n",
        "for q in questions:\n",
        "    print(\"\\n\",q)\n",
        "    cypher_query = generate_cypher_query(q)\n",
        "    print(cypher_query)\n",
        "    context = graph.query(cypher_query)\n",
        "    print('context: ', context)\n",
        "    result = chain.invoke({\"context\":context , \"question\":q})\n",
        "    print(result)"
      ]
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "collapsed_sections": [
        "coN4EuuIzZEG",
        "mX_QzqjJzNgT",
        "SC9NLzC21lIi"
      ],
      "gpuType": "T4",
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.10.11"
    },
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "032fc9d566704728a4cb92ca5e75819a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_fd8151cb82e04b31a577d9a03974f796",
            "placeholder": "​",
            "style": "IPY_MODEL_82b6dc8229da45d38e8ac7ea1671cda7",
            "value": " 464/464 [00:00&lt;00:00, 14.8kB/s]"
          }
        },
        "0496be4a562a439192fa438747dbdbd1": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_a9b59440d9384c7885a343c185f4c9d6",
            "placeholder": "​",
            "style": "IPY_MODEL_54b0a061363046ccbf5d3a324b75c8b1",
            "value": "Map: 100%"
          }
        },
        "0d2fe13aad9a4fff9662dcf80c8fca7b": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_ce4e97ffcfb345a6a1bfbc182724354f",
              "IPY_MODEL_113971d307b34a149322c01274c70f51",
              "IPY_MODEL_e72f744efa71493cb13d0a89e216f786"
            ],
            "layout": "IPY_MODEL_6b7a3f62c6cd401886b099bd7a4094d0"
          }
        },
        "0f9570764fed4bf68a4e1a0b0d103132": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_fce41b6ff9264839b227d87786a01c8e",
            "max": 762,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_399cf0648af84c218d70c4798acd8750",
            "value": 762
          }
        },
        "113971d307b34a149322c01274c70f51": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_88f2ba93a4804b63a167fc4fea2676f7",
            "max": 9085698,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_adcf95dfc89242d886ae6df8cf70c00a",
            "value": 9085698
          }
        },
        "134d5c5f2b014480a1dfbeab19f595a8": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_f347ec9c387c4d7ebd6eb05604aa330e",
            "placeholder": "​",
            "style": "IPY_MODEL_5134bfef1d214538a51513a47d41b767",
            "value": "special_tokens_map.json: 100%"
          }
        },
        "13f8b4a204d941c6bfcaa92c25780c5a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "1408019b5fe94bd6a084a0c58d4223c4": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_f08dea2fd8c84ca7879448c8e633367e",
            "max": 172,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_854bf74bd388412790f106b7988dac22",
            "value": 172
          }
        },
        "16845c66d22c46b2af1323b79c200b52": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "1cb84a294b8b4ca0b1d91ab8acc5ce69": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_38714087cbdc47528f72620204620014",
            "max": 5702746405,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_6cfec3520fd04454821a28907eeafb09",
            "value": 5702746405
          }
        },
        "1dce4c7d643842e1ae025bd09db7309b": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_0496be4a562a439192fa438747dbdbd1",
              "IPY_MODEL_0f9570764fed4bf68a4e1a0b0d103132",
              "IPY_MODEL_ac1fd89075c64a9da8894158efed37e4"
            ],
            "layout": "IPY_MODEL_e09a71f975174d57bedf9e29eeeef871"
          }
        },
        "22c29c45bf6c4c64bf5b9b130b02cdbd": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "2476aedd495542c99b0b5e5b20fc58c9": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "24c723f8d1394206803ee0d34c97bef7": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_2d0b443a35a240b1b6b0db538ead123d",
              "IPY_MODEL_1408019b5fe94bd6a084a0c58d4223c4",
              "IPY_MODEL_9599621998f14b3c8caa0c7807139d79"
            ],
            "layout": "IPY_MODEL_d9bbae2cab69446bb8fe8cfe1458c338"
          }
        },
        "26846b5ff2b3461983fa51a018cf58db": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "297881d35c1d4ce5b1348d4cc1f307fb": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "2d0b443a35a240b1b6b0db538ead123d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_b0c10a720e13411db76b2fe175533fbb",
            "placeholder": "​",
            "style": "IPY_MODEL_7190a95d9ab64642bd87c63800ef7655",
            "value": "generation_config.json: 100%"
          }
        },
        "30a641e46f8e4a8b86ec1cf916dcabb3": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "32854c8f504045d5931c07d00028e80a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "38714087cbdc47528f72620204620014": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "399cf0648af84c218d70c4798acd8750": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "3d1a3caded7b481680508f074140da4d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_645ca6826c8f4a489e1eda96ce8799f5",
            "placeholder": "​",
            "style": "IPY_MODEL_4d21240d967b4f6d8185ef84bd5c9bd3",
            "value": " 168M/168M [00:01&lt;00:00, 104MB/s]"
          }
        },
        "409400bcba7347c68e5e431e6d7aa4c1": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "418442c4a6de48c7bf9047e10dc37981": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "44104deec56e4f9d808497524ec17369": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_60ea1ee21a1048238194ae255b9d906f",
            "placeholder": "​",
            "style": "IPY_MODEL_22c29c45bf6c4c64bf5b9b130b02cdbd",
            "value": " 762/762 [00:05&lt;00:00, 154.52 examples/s]"
          }
        },
        "45a747af1fc4456d8fda7e590bfb310b": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_bb0b496ee9954d40ade599b0640a870d",
            "max": 732,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_26846b5ff2b3461983fa51a018cf58db",
            "value": 732
          }
        },
        "47e7d63ce36a40a7a796607c33bb413a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "49b8a2849c1e4d378127e6b837a3cfdb": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_cd1cb0d06d27410e9068f4d7fcffc854",
              "IPY_MODEL_45a747af1fc4456d8fda7e590bfb310b",
              "IPY_MODEL_ea1c0edb8e7444d896c438da2bd02ab8"
            ],
            "layout": "IPY_MODEL_c9343ee6fc7745f7ad0b94b108184e4e"
          }
        },
        "4b61a12378b74b4499d4c951c2f9e1aa": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "4bc3643ab256478796fc34ee9b2d0f72": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_81315ff30a9b4963b881d6aa4f86ec18",
              "IPY_MODEL_7ebf48b2b9ed4f7a95441804050a0740",
              "IPY_MODEL_44104deec56e4f9d808497524ec17369"
            ],
            "layout": "IPY_MODEL_5a80e5df479643ae8f5b86eba0feea2a"
          }
        },
        "4ce316cfef3b4cd8bddeda405d6a0438": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "4d21240d967b4f6d8185ef84bd5c9bd3": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "4e223c5547f143abb5eeaa396e8f2c2f": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "5134bfef1d214538a51513a47d41b767": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "5283ee999cff4ef7988963f075235f67": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d52d3dcaaef74e33813c180f38de8aa8",
            "placeholder": "​",
            "style": "IPY_MODEL_d3e78e54a6d84b13871feecf4746c845",
            "value": "config.json: 100%"
          }
        },
        "54b0a061363046ccbf5d3a324b75c8b1": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "5a3767d2d54643bc9aa9598a593f52f5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5a80e5df479643ae8f5b86eba0feea2a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5e25bd50b68c46599f2dc41eb2e2a819": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "60ea1ee21a1048238194ae255b9d906f": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "611f67423a5647368f717e231cf6f822": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_657e6b78393747b7913eb55c99e79cea",
              "IPY_MODEL_cc1b534956af44fb9419cfbee84d488d",
              "IPY_MODEL_b88c6b9a6735472e82b1bcefef6ec92a"
            ],
            "layout": "IPY_MODEL_7f173a4ef13a4fa7b3130dc72dc019c5"
          }
        },
        "6230dc6fdc644b38a5e4e0b40760e0af": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "63a2c6a69428403ca222e8170ca7404e": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_efc07c817a9e4e39b6ae37e40cdfe8d5",
            "placeholder": "​",
            "style": "IPY_MODEL_e079a4aa3f3248d7916ff4735941e580",
            "value": "adapter_model.safetensors: 100%"
          }
        },
        "63acc720749e4002af6bb70a7555d484": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "645ca6826c8f4a489e1eda96ce8799f5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "657e6b78393747b7913eb55c99e79cea": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_6230dc6fdc644b38a5e4e0b40760e0af",
            "placeholder": "​",
            "style": "IPY_MODEL_4b61a12378b74b4499d4c951c2f9e1aa",
            "value": "README.md: 100%"
          }
        },
        "689ba35c1e1f43caaf84590b9a3f3071": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "6929d475149748c18c5b7d89ae760731": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_81555692a53643d894924a00b98c2ae7",
            "max": 167832240,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_418442c4a6de48c7bf9047e10dc37981",
            "value": 167832240
          }
        },
        "69b333765def46349c96fc396716bcbb": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_134d5c5f2b014480a1dfbeab19f595a8",
              "IPY_MODEL_ffcfe7bd907d4ddcaa5940934c2775d5",
              "IPY_MODEL_032fc9d566704728a4cb92ca5e75819a"
            ],
            "layout": "IPY_MODEL_7d2c0091ff2148a59c6b5b2a9aec05d8"
          }
        },
        "6a6ba46091ad46b6bafc6648806d6840": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d8ad941e4a2f465b9a56acb8bcaf2947",
            "placeholder": "​",
            "style": "IPY_MODEL_ec7e01cf648548b280dad53cdda55a59",
            "value": "adapter_model.safetensors: 100%"
          }
        },
        "6b55bc322cce4cef8acadc736610999c": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "6b7a3f62c6cd401886b099bd7a4094d0": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6cfec3520fd04454821a28907eeafb09": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "6e3e9d06fdb94c78be3830fd1d85ad59": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "70c986563aa446709b0810f6dddbc229": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "7190a95d9ab64642bd87c63800ef7655": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "73c3659fe4c74ed69b08ab5129b351a4": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "79b18ec4d1e947188ae49b85d5005a10": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "7d2c0091ff2148a59c6b5b2a9aec05d8": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "7ebf48b2b9ed4f7a95441804050a0740": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_93706ddfeeec4229bb83ad515ac63acc",
            "max": 762,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_79b18ec4d1e947188ae49b85d5005a10",
            "value": 762
          }
        },
        "7f173a4ef13a4fa7b3130dc72dc019c5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8092f2c61cda4a92bacde140c912856f": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_6a6ba46091ad46b6bafc6648806d6840",
              "IPY_MODEL_6929d475149748c18c5b7d89ae760731",
              "IPY_MODEL_3d1a3caded7b481680508f074140da4d"
            ],
            "layout": "IPY_MODEL_d3bf48bee72b43a18633a1a0b88e35d7"
          }
        },
        "81315ff30a9b4963b881d6aa4f86ec18": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_aa14b97a97eb4ef299fbaf8491f61369",
            "placeholder": "​",
            "style": "IPY_MODEL_32854c8f504045d5931c07d00028e80a",
            "value": "Map (num_proc=2): 100%"
          }
        },
        "81555692a53643d894924a00b98c2ae7": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "82b6dc8229da45d38e8ac7ea1671cda7": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "854bf74bd388412790f106b7988dac22": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "8755cee22aa14e49843331d0654c8bf9": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_8afc7bf55fa04e2aa1777d92bee793b4",
              "IPY_MODEL_875d73dc4f584276a358a2dfeee9f935",
              "IPY_MODEL_d546be138e7241b6ab64910801c2556c"
            ],
            "layout": "IPY_MODEL_6e3e9d06fdb94c78be3830fd1d85ad59"
          }
        },
        "875d73dc4f584276a358a2dfeee9f935": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2476aedd495542c99b0b5e5b20fc58c9",
            "max": 50641,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_f9be1fea20bd4046a905937c17b6b284",
            "value": 50641
          }
        },
        "88f2ba93a4804b63a167fc4fea2676f7": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "891d5db064214416a023c456266792aa": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "8afc7bf55fa04e2aa1777d92bee793b4": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9e019ce56c7c4c988c6144216a032873",
            "placeholder": "​",
            "style": "IPY_MODEL_891d5db064214416a023c456266792aa",
            "value": "tokenizer_config.json: 100%"
          }
        },
        "8c3039ccb753467389d8a1dca0db6b22": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_63acc720749e4002af6bb70a7555d484",
            "placeholder": "​",
            "style": "IPY_MODEL_47e7d63ce36a40a7a796607c33bb413a",
            "value": "model.safetensors: 100%"
          }
        },
        "93706ddfeeec4229bb83ad515ac63acc": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9528079d04ea44cc83e63c087c796c71": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ec221012343f4b2d9cdd30d4ed46ea57",
            "placeholder": "​",
            "style": "IPY_MODEL_297881d35c1d4ce5b1348d4cc1f307fb",
            "value": " 168M/168M [00:04&lt;00:00, 45.3MB/s]"
          }
        },
        "9599621998f14b3c8caa0c7807139d79": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_30a641e46f8e4a8b86ec1cf916dcabb3",
            "placeholder": "​",
            "style": "IPY_MODEL_e65ade3b822442f79386a11c390cb7fe",
            "value": " 172/172 [00:00&lt;00:00, 5.70kB/s]"
          }
        },
        "9cafb4814d4b4f0fb1058800aaa198f5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9e019ce56c7c4c988c6144216a032873": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a9b59440d9384c7885a343c185f4c9d6": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "aa14b97a97eb4ef299fbaf8491f61369": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "aa906bdc597f4bbc8cf69f8fdec529b3": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_63a2c6a69428403ca222e8170ca7404e",
              "IPY_MODEL_ed39bbed66c04d488f03e258bd3b5eed",
              "IPY_MODEL_9528079d04ea44cc83e63c087c796c71"
            ],
            "layout": "IPY_MODEL_aeb71514fab841c193f52b016f051a86"
          }
        },
        "ac1fd89075c64a9da8894158efed37e4": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_dfbdc26a88184539890f2602c2411565",
            "placeholder": "​",
            "style": "IPY_MODEL_dfdd4dfa79a64a24a28c913398e43714",
            "value": " 762/762 [00:00&lt;00:00, 7075.14 examples/s]"
          }
        },
        "ac38d6c97db74a84a4e9107260e0ecb5": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "acb5aaf865ac4d38b88c863b6a1b16b5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "adcf95dfc89242d886ae6df8cf70c00a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "aeb71514fab841c193f52b016f051a86": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b0c10a720e13411db76b2fe175533fbb": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b23abc1da65d406b81fe6874e59f98c4": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b88c6b9a6735472e82b1bcefef6ec92a": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9cafb4814d4b4f0fb1058800aaa198f5",
            "placeholder": "​",
            "style": "IPY_MODEL_4e223c5547f143abb5eeaa396e8f2c2f",
            "value": " 580/580 [00:00&lt;00:00, 24.4kB/s]"
          }
        },
        "bb0b496ee9954d40ade599b0640a870d": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "c20fa5d6dee041a1ac71efe32796c85f": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "c41782aa2e9c48debd17126636e2a4ab": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_73c3659fe4c74ed69b08ab5129b351a4",
            "placeholder": "​",
            "style": "IPY_MODEL_e83b822678344d14876a692d0f227307",
            "value": " 1.18k/1.18k [00:00&lt;00:00, 80.0kB/s]"
          }
        },
        "c9343ee6fc7745f7ad0b94b108184e4e": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "cb2b23067e1545bba026a03e8c3f6bbc": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "cc1b534956af44fb9419cfbee84d488d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_5a3767d2d54643bc9aa9598a593f52f5",
            "max": 580,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_6b55bc322cce4cef8acadc736610999c",
            "value": 580
          }
        },
        "cd1cb0d06d27410e9068f4d7fcffc854": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_13f8b4a204d941c6bfcaa92c25780c5a",
            "placeholder": "​",
            "style": "IPY_MODEL_4ce316cfef3b4cd8bddeda405d6a0438",
            "value": "adapter_config.json: 100%"
          }
        },
        "ce4e97ffcfb345a6a1bfbc182724354f": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_cff1bd7801c64c5e8855770d876862d6",
            "placeholder": "​",
            "style": "IPY_MODEL_16845c66d22c46b2af1323b79c200b52",
            "value": "tokenizer.json: 100%"
          }
        },
        "cff1bd7801c64c5e8855770d876862d6": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d093deaa67d241d69faead13116ac4f2": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d18e8adf1bbe48628736d8d57cf0ffe5",
            "max": 1179,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_ac38d6c97db74a84a4e9107260e0ecb5",
            "value": 1179
          }
        },
        "d1004b680c8241a7ac4ab5d815321dc2": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d18e8adf1bbe48628736d8d57cf0ffe5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d3bf48bee72b43a18633a1a0b88e35d7": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d3e78e54a6d84b13871feecf4746c845": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "d52d3dcaaef74e33813c180f38de8aa8": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d546be138e7241b6ab64910801c2556c": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_c20fa5d6dee041a1ac71efe32796c85f",
            "placeholder": "​",
            "style": "IPY_MODEL_689ba35c1e1f43caaf84590b9a3f3071",
            "value": " 50.6k/50.6k [00:00&lt;00:00, 843kB/s]"
          }
        },
        "d8ad941e4a2f465b9a56acb8bcaf2947": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d9bbae2cab69446bb8fe8cfe1458c338": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "dd8f20f94a1b495aa705d87bc4cf7793": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "dfbdc26a88184539890f2602c2411565": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "dfdd4dfa79a64a24a28c913398e43714": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "e079a4aa3f3248d7916ff4735941e580": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "e09a71f975174d57bedf9e29eeeef871": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "e5878ba6021b4073bf9903c0e7f164a1": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "e65ade3b822442f79386a11c390cb7fe": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "e72f744efa71493cb13d0a89e216f786": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_acb5aaf865ac4d38b88c863b6a1b16b5",
            "placeholder": "​",
            "style": "IPY_MODEL_dd8f20f94a1b495aa705d87bc4cf7793",
            "value": " 9.09M/9.09M [00:00&lt;00:00, 26.1MB/s]"
          }
        },
        "e73a5ac63da941749b18b80ce3b96768": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_f8d29feaf85f479f8ba893c9deae9c1a",
            "placeholder": "​",
            "style": "IPY_MODEL_70c986563aa446709b0810f6dddbc229",
            "value": " 5.70G/5.70G [00:47&lt;00:00, 184MB/s]"
          }
        },
        "e83b822678344d14876a692d0f227307": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "ea1c0edb8e7444d896c438da2bd02ab8": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_5e25bd50b68c46599f2dc41eb2e2a819",
            "placeholder": "​",
            "style": "IPY_MODEL_ee201940617e446ca2603b0c2498d0ff",
            "value": " 732/732 [00:00&lt;00:00, 14.6kB/s]"
          }
        },
        "ec221012343f4b2d9cdd30d4ed46ea57": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ec7e01cf648548b280dad53cdda55a59": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "ed39bbed66c04d488f03e258bd3b5eed": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_b23abc1da65d406b81fe6874e59f98c4",
            "max": 167832240,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_cb2b23067e1545bba026a03e8c3f6bbc",
            "value": 167832240
          }
        },
        "ee201940617e446ca2603b0c2498d0ff": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "efc07c817a9e4e39b6ae37e40cdfe8d5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "f08dea2fd8c84ca7879448c8e633367e": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "f0fbcce4116a4a2687a84834ada80e98": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "f3300f1dd2e247a993f5fa9cfa367f96": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_5283ee999cff4ef7988963f075235f67",
              "IPY_MODEL_d093deaa67d241d69faead13116ac4f2",
              "IPY_MODEL_c41782aa2e9c48debd17126636e2a4ab"
            ],
            "layout": "IPY_MODEL_e5878ba6021b4073bf9903c0e7f164a1"
          }
        },
        "f347ec9c387c4d7ebd6eb05604aa330e": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "f5a71ef02778442e9fabd6274d517018": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_8c3039ccb753467389d8a1dca0db6b22",
              "IPY_MODEL_1cb84a294b8b4ca0b1d91ab8acc5ce69",
              "IPY_MODEL_e73a5ac63da941749b18b80ce3b96768"
            ],
            "layout": "IPY_MODEL_d1004b680c8241a7ac4ab5d815321dc2"
          }
        },
        "f8d29feaf85f479f8ba893c9deae9c1a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "f9be1fea20bd4046a905937c17b6b284": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "fce41b6ff9264839b227d87786a01c8e": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "fd8151cb82e04b31a577d9a03974f796": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ffcfe7bd907d4ddcaa5940934c2775d5": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_409400bcba7347c68e5e431e6d7aa4c1",
            "max": 464,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_f0fbcce4116a4a2687a84834ada80e98",
            "value": 464
          }
        }
      }
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
